summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-07-15 09:53:38 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-07-15 09:53:38 +0200
commit6db194289ece36e62cb8dab0aa178209b46c59f2 (patch)
tree6e1970919929dd3d2d03d343e4ec40ccad22ad66 /cmdline/apt-get.cc
parent35555c1826da5df9f2c06a74f2e91be843ad8142 (diff)
parent1d08f27046533e36849a63c084f51809be484d8c (diff)
merged from http://bzr.debian.org/bzr/apt/apt/debian-sid
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 94e078cb3..1a03acaa8 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1702,7 +1702,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
// we could have removed a new dependency of a garbage package,
// so check if a reverse depends is broken and if so install it again.
- if (tooMuch.empty() == false && Cache->BrokenCount() != 0)
+ if (tooMuch.empty() == false && (Cache->BrokenCount() != 0 || Cache->PolicyBrokenCount() != 0))
{
bool Changed;
do {
@@ -1713,8 +1713,8 @@ bool DoAutomaticRemove(CacheFile &Cache)
for (pkgCache::DepIterator R = P.RevDependsList();
R.end() == false; ++R)
{
- if (R->Type != pkgCache::Dep::Depends &&
- R->Type != pkgCache::Dep::PreDepends)
+ if (R.IsNegative() == true ||
+ Cache->IsImportantDep(R) == false)
continue;
pkgCache::PkgIterator N = R.ParentPkg();
if (N.end() == true || (N->CurrentVer == 0 && (*Cache)[N].Install() == false))