]> git.saurik.com Git - apt.git/commitdiff
configure also the replacement before remove by adding Immediate flag
authorDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 29 Jul 2010 10:26:26 +0000 (12:26 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 29 Jul 2010 10:26:26 +0000 (12:26 +0200)
apt-pkg/orderlist.cc
debian/changelog
test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order
test/integration/framework
test/integration/test-bug-590438-broken-provides-thanks-to-remove-order

index cb55147c3640da1105acc08c7479fab021377e56..602b63d3b6c5d761a92c4eb00a21f07280be1e39 100644 (file)
@@ -936,6 +936,7 @@ bool pkgOrderList::DepRemove(DepIterator D)
                            Cache[P].InstallVer != 0 &&
                            VisitNode(P) == true)
                        {
+                          Flag(P, Immediate);
                           tryFixDeps = false;
                           break;
                        }
@@ -970,6 +971,7 @@ bool pkgOrderList::DepRemove(DepIterator D)
                      IsFlag(F.TargetPkg(), InList) == false ||
                      VisitNode(F.TargetPkg()) == false)
                     continue;
+                 Flag(F.TargetPkg(), Immediate);
                  tryFixDeps = false;
                  break;
               }
index 86b154dab171393e332d3ddbe6f529bd244b9150..b836aaab873d7564532498da92bed4e5ca875261 100644 (file)
@@ -17,8 +17,9 @@ apt (0.7.26~exp11) experimental; urgency=low
   * apt-pkg/orderlist.cc:
     - try to install another or-group member in DepRemove before
       breaking the or group (Closes: #590438)
+    - configure also the replacement before remove by adding Immediate flag
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Wed, 28 Jul 2010 21:41:35 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com>  Thu, 29 Jul 2010 12:24:49 +0200
 
 apt (0.7.26~exp10) experimental; urgency=low
 
index 16bf008f6112b1aecb83096bfd406a2131255b6f..75a769e1a939f878d28890596826ec7701af2e03 100644 (file)
@@ -33,3 +33,35 @@ SHA256: a2337dfe1cc82aeae46f2c722e5cc7be9ecefdea4aaf13f540cfe70bd8b1d627
 Description-de: GNU awk, eine Mustererkennungs- und Verarbeitungssprache
 Homepage: http://www.gnu.org/software/gawk/
 Tag: devel::interpreter, implemented-in::c, interface::commandline, role::program, scope::utility, suite::gnu, use::filtering, use::scanning, works-with::text
+
+Package: gawk2
+Priority: optional
+Section: interpreters
+Installed-Size: 2084
+Maintainer: Arthur Loiret <aloiret@debian.org>
+Architecture: i386
+Version: 1:3.1.7.dfsg-5
+Provides: awk
+Pre-Depends: libc6 (>= 2.3)
+Depends: coolstuff
+Filename: pool/main/g/gawk/gawk_3.1.7.dfsg-5_i386.deb
+Size: 766008
+MD5sum: 6459a02cfc1b9eafb3c0415e4ff4e252
+SHA1: ac033488dae4b7e8167d610e490319c047edf7e4
+SHA256: a2337dfe1cc82aeae46f2c722e5cc7be9ecefdea4aaf13f540cfe70bd8b1d627
+Description-de: GNU awk, eine Mustererkennungs- und Verarbeitungssprache
+Homepage: http://www.gnu.org/software/gawk/
+Tag: devel::interpreter, implemented-in::c, interface::commandline, role::program, scope::utility, suite::gnu, use::filtering, use::scanning, works-with::text
+
+Package: coolstuff
+Priority: optional
+Section: cool
+Installed-Size: 10
+Maintainer: David Kalnischkies <kalnischkies+debian@gmail.com>
+Architecture: all
+Version: 1-1
+Filename: pool/main/c/coolstuff/coolstuff_1-1_all.deb
+Size: 7608
+MD5sum: 6459aa2efc139eafb323ac3f4f5aeb22
+Description: We all need cool stuff
+
index 7e0d4b902a85f6bf994a4a37d66eeb446451eab2..7b323fdb53c902e0f13a4f35d40c498ff7e5f6b2 100644 (file)
@@ -149,6 +149,22 @@ testequal() {
        $* 2>&1 | diff $COMPAREFILE - && msgpass || msgfail
 }
 
+testequalor2() {
+       local COMPAREFILE1=$(mktemp)
+       local COMPAREFILE2=$(mktemp)
+       local COMPAREAGAINST=$(mktemp)
+       echo "$1" > $COMPAREFILE1
+       echo "$2" > $COMPAREFILE2
+       shift 2
+       msgtest "Test for equality OR of" "$*"
+       $* 2>&1 1> $COMPAREAGAINST
+       (diff $COMPAREFILE1 $COMPAREAGAINST 1> /dev/null ||
+               diff $COMPAREFILE2 $COMPAREAGAINST 1> /dev/null) && msgpass ||
+               ( echo "\n${CINFO}Diff against OR 1${CNORMAL}" "$(diff $COMPAREFILE1 $COMPAREAGAINST)" \
+                      "\n${CINFO}Diff against OR 2${CNORMAL}" "$(diff $COMPAREFILE2 $COMPAREAGAINST)" &&
+                 msgfail )
+}
+
 testshowvirtual() {
        local VIRTUAL="E: Can't select versions from package '$1' as it purely virtual"
        local PACKAGE="$1"
index bb10c4f733f20bd669ef86335a0c75b45de3a4d9..17ce5029510ba32c891c9aa1a6b26133970358ba 100755 (executable)
@@ -24,7 +24,7 @@ Size: 73986
 MD5sum: 8489687ce10e656babd467c9ee389349
 Description-de: Verschiedene Dateien für das Basis-System von Debian"
 
-predependstest() {
+predependsgawk() {
 #      rm rootdir/var/cache/apt/*.bin
        cp $TESTDIR/$(echo "$(basename $0)" | sed 's/test-/status-/') rootdir/var/lib/dpkg/status
        echo "$pkgbasefile
@@ -35,25 +35,64 @@ Conf gawk (1:3.1.7.dfsg-5 localhost [i386])
 Remv mawk [1.3.3-15]" aptget install gawk mawk- -sqq -o PreDepends=$(echo "$1" | sed 's/ //g')
 }
 
-predependstest "gawk | mawk"
-predependstest "mawk | gawk"
+predependsgawk "gawk | mawk"
+predependsgawk "mawk | gawk"
 
-predependstest "aawk | mawk | gawk"
-predependstest "aawk | gawk | mawk"
+predependsgawk "aawk | mawk | gawk"
+predependsgawk "aawk | gawk | mawk"
 
-predependstest "gawk | awk"
-predependstest "aawk | gawk | awk"
+predependsgawk "gawk | awk"
+predependsgawk "aawk | gawk | awk"
 
-predependstest "mawk | awk"
+predependsgawk "mawk | awk"
 
-predependstest "awk | gawk"
-predependstest "awk | gawk | aawk"
+predependsgawk "awk | gawk"
+predependsgawk "awk | gawk | aawk"
 
-predependstest "awk | mawk"
+predependsgawk "awk | mawk"
 
-predependstest "aawk | awk"
-predependstest "awk | aawk"
+predependsgawk "aawk | awk"
+predependsgawk "awk | aawk"
 
-predependstest "awk"
+predependsgawk "awk"
 
-# aptget install gawk mawk- -sqq -o Debug::pkgOrderList=1 #-o Debug::pkgPackageManager=1
+predependsgawk2() {
+#      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
+" >> rootdir/var/lib/dpkg/status
+       testequalor2 "Inst coolstuff (1-1 localhost [all])
+Conf coolstuff (1-1 localhost [all])
+Inst gawk2 (1:3.1.7.dfsg-5 localhost [i386])
+Conf gawk2 (1:3.1.7.dfsg-5 localhost [i386])
+Remv mawk [1.3.3-15]" "Inst coolstuff (1-1 localhost [all])
+Inst gawk2 (1:3.1.7.dfsg-5 localhost [i386])
+Conf coolstuff (1-1 localhost [all])
+Conf gawk2 (1:3.1.7.dfsg-5 localhost [i386])
+Remv mawk [1.3.3-15]" aptget install gawk2 mawk- -sqq -o PreDepends=$(echo "$1" | sed 's/ //g')
+}
+
+predependsgawk2 "gawk2 | mawk"
+predependsgawk2 "mawk | gawk2"
+
+predependsgawk2 "aawk | mawk | gawk2"
+predependsgawk2 "aawk | gawk2 | mawk"
+
+predependsgawk2 "gawk2 | awk"
+predependsgawk2 "aawk | gawk2 | awk"
+
+predependsgawk2 "mawk | awk"
+
+predependsgawk2 "awk | gawk2"
+predependsgawk2 "awk | gawk2 | aawk"
+
+predependsgawk2 "awk | mawk"
+
+predependsgawk2 "aawk | awk"
+predependsgawk2 "awk | aawk"
+
+predependsgawk2 "awk"
+
+
+# aptget install gawk2 mawk- -s #-o Debug::pkgOrderList=1 #-o Debug::pkgPackageManager=1