summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-02-11 21:01:35 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-02-11 21:01:35 +0100
commitdd61e64da1fbae01dc82bab3635c946718cc0eb0 (patch)
treea900454edaa5e36ff2cc2bb3f72cf0858353f594 /apt-pkg
parent5834d7a103cb8b68cd6eb072b4b789ca679a2d71 (diff)
save the universe by not printing messages about apport if a package
with this name is not installed (Closes: #619646)
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/dpkgpm.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 3f9e68210..499c3db8a 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1446,6 +1446,12 @@ void pkgDPkgPM::Reset()
/* */
void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
{
+ // If apport doesn't exist or isn't installed do nothing
+ // This e.g. prevents messages in 'universes' without apport
+ pkgCache::PkgIterator apportPkg = Cache.FindPkg("apport");
+ if (apportPkg.end() == true || apportPkg->CurrentVer == 0)
+ return;
+
string pkgname, reportfile, srcpkgname, pkgver, arch;
string::size_type pos;
FILE *report;