summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-07-06 12:46:29 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-07-06 12:46:29 +0200
commitb41929c0139d0658046fb4e4088a8de167705a99 (patch)
treeb13c2f30489871cd09eea7aeb7bbaba3cda6a4b7 /cmdline
parent58014adc6df1772567e0bc32687f1a03cfcb49fb (diff)
* cmdline/apt-get.cc:
- restore all important dependencies for garbage packages (LP: #806274)
Diffstat (limited to 'cmdline')
-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 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))