summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/orderlist.cc2
-rw-r--r--debian/changelog3
-rw-r--r--test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order32
-rw-r--r--test/integration/framework16
-rwxr-xr-xtest/integration/test-bug-590438-broken-provides-thanks-to-remove-order69
5 files changed, 106 insertions, 16 deletions
diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc
index cb55147c3..602b63d3b 100644
--- a/apt-pkg/orderlist.cc
+++ b/apt-pkg/orderlist.cc
@@ -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;
}
diff --git a/debian/changelog b/debian/changelog
index 86b154dab..b836aaab8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order b/test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order
index 16bf008f6..75a769e1a 100644
--- a/test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order
+++ b/test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order
@@ -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
+
diff --git a/test/integration/framework b/test/integration/framework
index 7e0d4b902..7b323fdb5 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -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"
diff --git a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order
index bb10c4f73..17ce50295 100755
--- a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order
+++ b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order
@@ -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