]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/packagemanager.cc:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 19 May 2012 21:07:30 +0000 (23:07 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 19 May 2012 21:07:30 +0000 (23:07 +0200)
  - do not run into loop on new-pre-depends-breaks (Closes: #673536)

apt-pkg/packagemanager.cc
debian/changelog
test/integration/test-673536-pre-depends-breaks-loop [new file with mode: 0755]

index 06151a165ddb60c2042c84d7527150a55b4b86c8..46fc499c615e5091cddca445f691633fbba3bef6 100644 (file)
@@ -785,7 +785,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
                           VerIterator V(Cache,*I);
                           PkgIterator P = V.ParentPkg();
                           // we are checking for installation as an easy 'protection' against or-groups and (unchosen) providers
-                          if (P->CurrentVer == 0 || P != Pkg || (P.CurrentVer() != V && Cache[P].InstallVer != V))
+                          if (P != Pkg || (P.CurrentVer() != V && Cache[P].InstallVer != V))
                              continue;
                           circle = true;
                           break;
index d419f9986a0e3e0992a922599b32d74955a4f0b7..196b94c8eda64abb1cf3ed85d05fd2be1c2d2978 100644 (file)
@@ -33,6 +33,8 @@ apt (0.9.4) UNRELEASED; urgency=low
       to get the correct section titles provided by docbook
   * doc/po/de.po:
     - updated german manpage translation by Chris Leick, thanks!
+  * apt-pkg/packagemanager.cc:
+    - do not run into loop on new-pre-depends-breaks (Closes: #673536)
 
   [ Raphael Geissert ]
   * apt-pkg/acquire*.cc:
diff --git a/test/integration/test-673536-pre-depends-breaks-loop b/test/integration/test-673536-pre-depends-breaks-loop
new file mode 100755 (executable)
index 0000000..e9d3c4d
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'native'
+
+buildsimplenativepackage 'basic' 'native' '1' 'stable'
+buildsimplenativepackage 'basic' 'native' '2' 'unstable' 'Pre-Depends: common'
+buildsimplenativepackage 'common' 'native' '2' 'unstable' 'Breaks: basic (<= 1)'
+
+setupaptarchive
+
+# we check with 'real' packages here as the simulation reports a 'Conf broken'
+# which is technical correct for the simulation, but testing errormsg is ugly
+
+aptget install basic=1 -qq > /dev/null
+testdpkginstalled basic
+testdpkgnotinstalled common
+
+aptget dist-upgrade -qq > /dev/null
+testdpkginstalled basic common