diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-11-10 13:26:37 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-11-10 13:26:37 +0100 |
commit | edbda33bdef6a480fcfcb5d6b9a219c10cbeaaba (patch) | |
tree | 8ca43482d477b2a437d368e4ab1fa1c6ff6aaad8 | |
parent | a3f1a6ccd29480ae45e0a82871b05e009741d7fa (diff) |
* apt-pkg/depcache.cc:
- don't install previously not installed providers in a try
to statisfy a "Breaks: provides" dependency by upgrade
-rw-r--r-- | apt-pkg/depcache.cc | 7 | ||||
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | test/integration/Packages-xorg-break-providers | 52 | ||||
-rw-r--r-- | test/integration/status-xorg-break-providers | 22 | ||||
-rwxr-xr-x | test/integration/test-xorg-break-providers | 43 |
5 files changed, 126 insertions, 3 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 0b5d6d8e6..23abc76c1 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1444,8 +1444,11 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst, VerIterator Ver(*this,*I); PkgIterator Pkg = Ver.ParentPkg(); - - + /* The List includes all packages providing this dependency, + even providers which are not installed, so skip them. */ + if (PkgState[Pkg->ID].InstallVer == 0) + continue; + if (PkgState[Pkg->ID].CandidateVer != *I && Start->Type == Dep::DpkgBreaks) MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps); diff --git a/debian/changelog b/debian/changelog index 57b32f8f6..52581d8c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,8 +14,11 @@ apt (0.8.9) UNRELEASED; urgency=low * apt-pkg/algorithms.cc: - if the package was explicitly marked as ToRemove don't consider it as a candidate for FixByInstall + * apt-pkg/depcache.cc: + - don't install previously not installed providers in a try + to statisfy a "Breaks: provides" dependency by upgrade - -- David Kalnischkies <kalnischkies@gmail.com> Wed, 10 Nov 2010 12:23:29 +0100 + -- David Kalnischkies <kalnischkies@gmail.com> Wed, 10 Nov 2010 13:22:39 +0100 apt (0.8.8) unstable; urgency=low diff --git a/test/integration/Packages-xorg-break-providers b/test/integration/Packages-xorg-break-providers new file mode 100644 index 000000000..f6e1d81f9 --- /dev/null +++ b/test/integration/Packages-xorg-break-providers @@ -0,0 +1,52 @@ +Package: xserver-xorg-video-intel +Priority: optional +Section: x11 +Installed-Size: 1292 +Maintainer: Debian X Strike Force <debian-x@lists.debian.org> +Architecture: i386 +Version: 2:2.13.901-2 +Provides: xserver-xorg-video-8 +Filename: pool/main/x/xserver-xorg-video-intel/xserver-xorg-video-intel_2.13.901-2_i386.deb +Size: 586964 +MD5sum: 72527f4b2c9d734e53202736e3177865 +Description: X.Org X server -- Intel i8xx, i9xx display driver + +Package: xserver-xorg-video-vesa +Priority: optional +Section: x11 +Installed-Size: 104 +Maintainer: Debian X Strike Force <debian-x@lists.debian.org> +Architecture: i386 +Version: 1:2.3.0-4 +Provides: xserver-xorg-video-8 +Filename: pool/main/x/xserver-xorg-video-vesa/xserver-xorg-video-vesa_2.3.0-4_i386.deb +Size: 27158 +MD5sum: 77bf2935c40b3b7739d431930e53d185 +Description: X.Org X server -- VESA display driver + +Package: xserver-xorg-video-vesa +Priority: optional +Section: x11 +Installed-Size: 104 +Maintainer: Debian X Strike Force <debian-x@lists.debian.org> +Architecture: i386 +Version: 1:2.3.0-3 +Provides: xserver-xorg-video-6 +Filename: pool/main/x/xserver-xorg-video-vesa/xserver-xorg-video-vesa_2.3.0-3_i386.deb +Size: 27122 +MD5sum: 0cd97be927c7d75f2a7230739f8f866c +Description: X.Org X server -- VESA display driver + +Package: xserver-xorg-core +Priority: optional +Section: x11 +Installed-Size: 4436 +Maintainer: Debian X Strike Force <debian-x@lists.debian.org> +Architecture: i386 +Source: xorg-server +Version: 2:1.7.7-8 +Breaks: xserver-xorg-video-6 +Filename: pool/main/x/xorg-server/xserver-xorg-core_1.7.7-8_i386.deb +Size: 2405050 +MD5sum: 976ddb13473e52903dd839d1f7ec390b +Description: Xorg X server - core server diff --git a/test/integration/status-xorg-break-providers b/test/integration/status-xorg-break-providers new file mode 100644 index 000000000..c6373518f --- /dev/null +++ b/test/integration/status-xorg-break-providers @@ -0,0 +1,22 @@ +Package: xserver-xorg-core +Status: install ok installed +Priority: optional +Section: x11 +Installed-Size: 4436 +Maintainer: Debian X Strike Force <debian-x@lists.debian.org> +Architecture: i386 +Source: xorg-server +Version: 2:1.7.7-8 +Breaks: xserver-xorg-video-5 +Description: Xorg X server - core server + +Package: xserver-xorg-video-intel +Status: install ok installed +Priority: optional +Section: x11 +Installed-Size: 1268 +Maintainer: Debian X Strike Force <debian-x@lists.debian.org> +Architecture: i386 +Version: 2:2.13.0-2 +Provides: xserver-xorg-video-6 +Description: X.Org X server -- Intel i8xx, i9xx display driver diff --git a/test/integration/test-xorg-break-providers b/test/integration/test-xorg-break-providers new file mode 100755 index 000000000..139d2c915 --- /dev/null +++ b/test/integration/test-xorg-break-providers @@ -0,0 +1,43 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" +setupaptarchive + +# the new xserver-xorg-core breaks xserver-xorg-video-6 +# which both -intel (installed) and -vesa (not installed) +# provided in their old version. +# The test ensures that only -intel will be upgraded +# (together with -core of course) and -vesa not touched. + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + xserver-xorg-video-intel +The following packages will be upgraded: + xserver-xorg-core xserver-xorg-video-intel +2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Need to get 0 B/2992 kB of archives. +After this operation, 24.6 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation.' aptget install xserver-xorg-core --trivial-only + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be upgraded: + xserver-xorg-core xserver-xorg-video-intel +2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Need to get 0 B/2992 kB of archives. +After this operation, 24.6 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation.' aptget upgrade --trivial-only + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be upgraded: + xserver-xorg-core xserver-xorg-video-intel +2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Need to get 0 B/2992 kB of archives. +After this operation, 24.6 kB of additional disk space will be used. +E: Trivial Only specified but this is not a trivial operation.' aptget dist-upgrade --trivial-only |