diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-03-04 12:52:13 +0100 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-03-04 12:52:13 +0100 |
| commit | 7d0b86ce4ce9401b7177c91874cac9e1e0ee42c7 (patch) | |
| tree | 2cb061660f9ad48e8fcc8dd859f6f2aa0ff14b34 /lib/MiddleWare/MiddleWare.cpp | |
| parent | 6f13bfb6b3e6007d75ccc2d727d5db45c50cb57a (diff) | |
| parent | 60150bac2c6ecc10a1d761bdecef696566d9ef43 (diff) | |
| download | abrt-7d0b86ce4ce9401b7177c91874cac9e1e0ee42c7.tar.gz abrt-7d0b86ce4ce9401b7177c91874cac9e1e0ee42c7.tar.xz abrt-7d0b86ce4ce9401b7177c91874cac9e1e0ee42c7.zip | |
Merge branch 'master' of git://git.fedorahosted.org/git/crash-catcher
Diffstat (limited to 'lib/MiddleWare/MiddleWare.cpp')
| -rw-r--r-- | lib/MiddleWare/MiddleWare.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/lib/MiddleWare/MiddleWare.cpp b/lib/MiddleWare/MiddleWare.cpp index 20ee48a..4dcf664 100644 --- a/lib/MiddleWare/MiddleWare.cpp +++ b/lib/MiddleWare/MiddleWare.cpp @@ -68,7 +68,7 @@ void CMiddleWare::LoadSettings(const std::string& pPath) set_opengpg_keys_t::iterator it_k; for (it_k = m_setOpenGPGKeys.begin(); it_k != m_setOpenGPGKeys.end(); it_k++) { - m_RPMInfo.LoadOpenGPGPublicKey(*it_k); + m_RPM.LoadOpenGPGPublicKey(*it_k); } } if (settings.find("EnableOpenGPG") != settings.end()) @@ -108,9 +108,15 @@ void CMiddleWare::DebugDump2Report(const std::string& pDebugDumpDir, crash_repor dd.LoadText(FILENAME_KERNEL, pCrashReport.m_sKernel); dd.LoadText(FILENAME_PACKAGE, pCrashReport.m_sPackage); dd.LoadText(FILENAME_EXECUTABLE, pCrashReport.m_sExecutable); - dd.LoadText(FILENAME_CMDLINE, pCrashReport.m_sCmdLine); - dd.LoadText(FILENAME_RELEASE, pCrashReport.m_sRelease); + if (dd.Exist(FILENAME_CMDLINE)) + { + dd.LoadText(FILENAME_CMDLINE, pCrashReport.m_sCmdLine); + } + if (dd.Exist(FILENAME_RELEASE)) + { + dd.LoadText(FILENAME_RELEASE, pCrashReport.m_sRelease); + } if (dd.Exist(FILENAME_TEXTDATA1)) { dd.LoadText(FILENAME_TEXTDATA1, pCrashReport.m_sTextData1); @@ -281,10 +287,16 @@ int CMiddleWare::SaveDebugDump(const std::string& pDebugDumpDir, crash_info_t& p dd.Open(pDebugDumpDir); dd.LoadText(FILENAME_EXECUTABLE, executable); - package = m_RPMInfo.GetPackage(executable, description); - if (executable != "kernel") + if (executable == "kernel") + { + package = "kernel"; + description = m_RPM.GetDescription(executable); + } + else { + package = m_RPM.GetPackage(executable); std::string packageName = package.substr(0, package.rfind("-", package.rfind("-") - 1)); + description = m_RPM.GetDescription(executable); if (packageName == "" || (m_setBlackList.find(packageName) != m_setBlackList.end())) { @@ -294,8 +306,8 @@ int CMiddleWare::SaveDebugDump(const std::string& pDebugDumpDir, crash_info_t& p } if (m_bOpenGPGCheck) { - if (!m_RPMInfo.CheckFingerprint(packageName) || - !m_RPMInfo.CheckHash(packageName, executable)) + if (!m_RPM.CheckFingerprint(packageName) || + !m_RPM.CheckHash(packageName, executable)) { dd.Delete(); dd.Close(); @@ -303,16 +315,6 @@ int CMiddleWare::SaveDebugDump(const std::string& pDebugDumpDir, crash_info_t& p } } } - else - { - package = "kernel"; - description = "The Linux kernel"; - description += "\n\n"; - description += "The kernel contains the Linux kernel (vmlinuz), the core of any" - "Linux operating system. The kernel handles the basic functions" - "of the operating system: memory allocation, process allocation, device" - "input and output, etc."; - } dd.SaveText(FILENAME_PACKAGE, package); dd.SaveText(FILENAME_DESCRIPTION, description); |
