diff options
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); |
