summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-07-15 10:16:59 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-07-15 10:16:59 +0200
commit5e4d60ae66873924815edb89d533faab7006a46b (patch)
treec0e3c05585374c810100ad7bf6a9f283a7b52a3d /cmdline/apt-get.cc
parent0dc01623882a8a51416e8635e76c941fc302abec (diff)
parent1d08f27046533e36849a63c084f51809be484d8c (diff)
merged from the debian-sid branch
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 cb2ec0a2b..8d4c6923c 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))