]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/orderlist.cc:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 6 Nov 2010 14:02:27 +0000 (15:02 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 6 Nov 2010 14:02:27 +0000 (15:02 +0100)
  - try fixing before removing even if the fix is hidden in
    a provides, hidden in the #590438 testcase

apt-pkg/orderlist.cc
debian/changelog
test/integration/test-bug-590438-broken-provides-thanks-to-remove-order

index 602b63d3b6c5d761a92c4eb00a21f07280be1e39..a53854a2687124eff9a10791e0c65a7c6923471c 100644 (file)
@@ -967,13 +967,33 @@ bool pkgOrderList::DepRemove(DepIterator D)
               // start again in the or group and find something which will serve as replacement
               for (; F.end() == false && F != S; ++F)
               {
-                 if (F.TargetPkg() == D.TargetPkg() ||
-                     IsFlag(F.TargetPkg(), InList) == false ||
-                     VisitNode(F.TargetPkg()) == false)
-                    continue;
-                 Flag(F.TargetPkg(), Immediate);
-                 tryFixDeps = false;
-                 break;
+                 if (IsFlag(F.TargetPkg(), InList) == true &&
+                     IsFlag(F.TargetPkg(), AddPending) == false &&
+                     Cache[F.TargetPkg()].InstallVer != 0 &&
+                     VisitNode(F.TargetPkg()) == true)
+                 {
+                    Flag(F.TargetPkg(), Immediate);
+                    tryFixDeps = false;
+                    break;
+                 }
+                 else if (F.TargetPkg()->ProvidesList != 0)
+                 {
+                    pkgCache::PrvIterator Prv = F.TargetPkg().ProvidesList();
+                    for (; Prv.end() == false; ++Prv)
+                    {
+                       if (IsFlag(Prv.OwnerPkg(), InList) == true &&
+                           IsFlag(Prv.OwnerPkg(), AddPending) == false &&
+                           Cache[Prv.OwnerPkg()].InstallVer != 0 &&
+                           VisitNode(Prv.OwnerPkg()) == true)
+                       {
+                          Flag(Prv.OwnerPkg(), Immediate);
+                          tryFixDeps = false;
+                          break;
+                       }
+                    }
+                    if (Prv.end() == false)
+                       break;
+                 }
               }
               if (tryFixDeps == false)
                  break;
index ae547bcffcaace70aba421b4b889378b7cda1113..510bc453caa7e2559c204b5bf50713cc76bcefc5 100644 (file)
@@ -8,6 +8,9 @@ apt (0.8.9) UNRELEASED; urgency=low
   [ David Kalnischkies ]
   * apt-pkg/aptconfiguration.cc:
     - respect the none-force even in LANG=C (Closes: #602573)
+  * apt-pkg/orderlist.cc:
+    - try fixing before removing even if the fix is hidden in
+      a provides, hidden in the #590438 testcase
 
  -- David Kalnischkies <kalnischkies@gmail.com>  Sat, 06 Nov 2010 12:50:20 +0100
 
index 3be0bec48672067163afdf9b17f6bfecf90cdd3f..0f64939484f1497bec69b28a5886be8d7b863b42 100755 (executable)
@@ -25,7 +25,7 @@ MD5sum: 8489687ce10e656babd467c9ee389349
 Description-de: Verschiedene Dateien für das Basis-System von Debian"
 
 predependsgawk() {
-#      rm rootdir/var/cache/apt/*.bin
+       rm rootdir/var/cache/apt/*.bin
        cp $TESTDIR/$(echo "$(basename $0)" | sed 's/test-/status-/') rootdir/var/lib/dpkg/status
        echo "$pkgbasefile
 Pre-Depends: $1
@@ -57,7 +57,7 @@ predependsgawk "awk | aawk"
 predependsgawk "awk"
 
 predependsgawk2() {
-#      rm rootdir/var/cache/apt/*.bin
+       rm rootdir/var/cache/apt/*.bin
        cp $TESTDIR/$(echo "$(basename $0)" | sed 's/test-/status-/') rootdir/var/lib/dpkg/status
        echo "$pkgbasefile
 Pre-Depends: $1