From b41929c0139d0658046fb4e4088a8de167705a99 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 6 Jul 2011 12:46:29 +0200 Subject: * cmdline/apt-get.cc: - restore all important dependencies for garbage packages (LP: #806274) --- cmdline/apt-get.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmdline') 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)) -- cgit v1.2.3