diff options
| author | Zdenek Prikryl <zprikryl@redhat.com> | 2009-02-25 11:55:54 +0100 |
|---|---|---|
| committer | Zdenek Prikryl <zprikryl@redhat.com> | 2009-02-25 11:55:54 +0100 |
| commit | 546601f1df0536ba7818eec31eb658676e11f56f (patch) | |
| tree | c9f12e9b99926207ff9fda4ebaa1929acc6c807c /lib/MiddleWare/RPMInfo.cpp | |
| parent | 605c08c7d9607f2c98d0b7588dd8d55ca8d23f2b (diff) | |
| download | abrt-546601f1df0536ba7818eec31eb658676e11f56f.tar.gz abrt-546601f1df0536ba7818eec31eb658676e11f56f.tar.xz abrt-546601f1df0536ba7818eec31eb658676e11f56f.zip | |
added package's description
Diffstat (limited to 'lib/MiddleWare/RPMInfo.cpp')
| -rw-r--r-- | lib/MiddleWare/RPMInfo.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/MiddleWare/RPMInfo.cpp b/lib/MiddleWare/RPMInfo.cpp index 55dccd2..605f698 100644 --- a/lib/MiddleWare/RPMInfo.cpp +++ b/lib/MiddleWare/RPMInfo.cpp @@ -96,7 +96,7 @@ bool CRPMInfo::CheckHash(const std::string& pPackage, const std::string& pPath) return ret; } -std::string CRPMInfo::GetPackage(const std::string& pFileName) +std::string CRPMInfo::GetPackage(const std::string& pFileName, std::string& pDescription) { std::string ret = ""; rpmts ts = rpmtsCreate(); @@ -110,6 +110,13 @@ std::string CRPMInfo::GetPackage(const std::string& pFileName) ret = nerv; free(nerv); } + rpmtd td = rpmtdNew(); + headerGet(header, RPMTAG_SUMMARY, td, HEADERGET_DEFAULT); + const char* summary = rpmtdGetString(td); + headerGet(header, RPMTAG_DESCRIPTION, td, HEADERGET_DEFAULT); + const char* description = rpmtdGetString(td); + pDescription = summary + std::string("\n\n") + description; + rpmtdFree(td); } rpmdbFreeIterator(iter); |
