diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-15 09:45:33 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-15 09:45:33 +0200 |
commit | 1d08f27046533e36849a63c084f51809be484d8c (patch) | |
tree | 4efff5cb3ab69fc877569a715a00e4c96d027b58 /cmdline/apt-get.cc | |
parent | 118192bfd764d03af4cfcfc10eb9c38e7cc98721 (diff) | |
parent | db4351bee8204c5eb352bb5667d3fbd416685715 (diff) |
merged from lp:~donkult/apt/sid
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r-- | cmdline/apt-get.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 845c92026..3292ae745 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1697,7 +1697,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 { @@ -1708,8 +1708,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)) |