diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-02-07 11:32:55 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-02-07 11:32:55 +0100 |
commit | 6a910c9db4d450241a57f61b2d3d3e302bb9c11c (patch) | |
tree | e58a9420d269e08c011abfa4f34e0c42aeeefc78 | |
parent | fbd64f76a595b61d2aaa9c0615903d9b68786930 (diff) |
allow conflicts in the same group again (Closes: #612099)
-rw-r--r-- | apt-pkg/depcache.cc | 2 | ||||
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | test/integration/framework | 2 | ||||
-rwxr-xr-x | test/integration/test-bug-612099-multiarch-conflicts | 209 |
4 files changed, 213 insertions, 3 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 5f59b6d49..7c09d3a38 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -339,7 +339,7 @@ bool pkgDepCache::CheckDep(DepIterator Dep,int Type,PkgIterator &Res) /* Check simple depends. A depends -should- never self match but we allow it anyhow because dpkg does. Technically it is a packaging bug. Conflicts may never self match */ - if (Dep.TargetPkg()->Group != Dep.ParentPkg()->Group || + if (Dep.TargetPkg() != Dep.ParentPkg() || (Dep->Type != Dep::Conflicts && Dep->Type != Dep::DpkgBreaks && Dep->Type != Dep::Obsoletes)) { PkgIterator Pkg = Dep.TargetPkg(); diff --git a/debian/changelog b/debian/changelog index 29d310871..7fb6557e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ apt (0.8.11) UNRELEASED; urgency=low - add SetCandidateRelease() to set a candidate version and the candidates of dependencies if needed to a specified release (Closes: #572709) + - allow conflicts in the same group again (Closes: #612099) * cmdline/apt-get.cc: - if --print-uris is used don't setup downloader as we don't need progress, lock nor the directories it would create otherwise @@ -95,7 +96,7 @@ apt (0.8.11) UNRELEASED; urgency=low will actually test uncompressed indexes regardless of the internal default value of Acquire::GzipIndexes. - -- David Kalnischkies <kalnischkies@gmail.com> Mon, 07 Feb 2011 11:21:12 +0100 + -- David Kalnischkies <kalnischkies@gmail.com> Mon, 07 Feb 2011 11:26:03 +0100 apt (0.8.10.3) unstable; urgency=low diff --git a/test/integration/framework b/test/integration/framework index 3aa80db23..d91599f1b 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -267,7 +267,7 @@ Package: $NAME" > ${BUILDDIR}/debian/control (cd ${BUILDDIR}; dpkg-gencontrol -DArchitecture=$ARCH) (cd ${BUILDDIR}/debian/tmp; md5sum $(find usr/ -type f) > DEBIAN/md5sums) - dpkg-deb --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. > /dev/null + dpkg-deb --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. 2> /dev/null > /dev/null echo "pool/${NAME}_${VERSION}_${ARCH}.deb" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.pkglist for SRC in $SRCS; do echo "pool/${SRC}" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.srclist diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts new file mode 100755 index 000000000..caac75db4 --- /dev/null +++ b/test/integration/test-bug-612099-multiarch-conflicts @@ -0,0 +1,209 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" "amd64" + +buildsimplenativepackage 'peace-dpkg' 'all' '1.0' 'stable' + +buildsimplenativepackage 'libc6' 'i386' '1.0' 'stable' +buildsimplenativepackage 'libc6' 'amd64' '1.0' 'stable' +buildsimplenativepackage 'libc6' 'all' '2.0' 'testing' + +buildsimplenativepackage 'foobar' 'i386' '1.0' 'stable' 'Depends: libc6' +buildsimplenativepackage 'foobar' 'amd64' '1.0' 'stable' 'Depends: libc6' + +setupaptarchive + +aptget install peace-dpkg:i386 -y -qq 2>&1 > /dev/null +testdpkginstalled peace-dpkg + +aptget install libc6:i386 -t stable -y -qq 2>&1 > /dev/null +testdpkginstalled libc6 +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + libc6 +The following NEW packages will be installed: + libc6:amd64 +0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. +Remv libc6 [1.0] +Inst libc6:amd64 (1.0 stable [amd64]) +Conf libc6:amd64 (1.0 stable [amd64])' aptget install libc6:amd64 -s -t stable + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + foobar +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foobar (1.0 stable [i386]) +Conf foobar (1.0 stable [i386])' aptget install foobar -st stable + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following extra packages will be installed: + libc6:amd64 +The following packages will be REMOVED: + libc6 +The following NEW packages will be installed: + foobar:amd64 libc6:amd64 +0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. +Remv libc6 [1.0] +Inst libc6:amd64 (1.0 stable [amd64]) +Inst foobar:amd64 (1.0 stable [amd64]) +Conf libc6:amd64 (1.0 stable [amd64]) +Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64 -st stable + +# FIXME: libc6:i386 is installed, we are switching to libc6:all +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following extra packages will be installed: + libc6 +The following NEW packages will be installed: + foobar libc6 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst libc6 (2.0 testing, testing [all]) +Inst foobar (1.0 stable [i386]) +Conf libc6 (2.0 testing, testing [all]) +Conf foobar (1.0 stable [i386])' aptget install foobar/stable libc6 -st testing + +# FIXME: libc6:i386 is installed, we are switching to libc6:all +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + libc6 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libc6 (2.0 testing, testing [all]) +Conf libc6 (2.0 testing, testing [all])' aptget upgrade -t testing -s +aptget upgrade -y -qq 2>&1 > /dev/null +testdpkginstalled libc6 + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + foobar +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foobar (1.0 stable [i386]) [] +Conf foobar (1.0 stable [i386])' aptget install foobar/stable -st testing + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + foobar:amd64 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foobar:amd64 (1.0 stable [amd64]) +Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64/stable -st testing + + +# FIXME: the display is a strange (its a downgrade), but the handling itself correct +testequal "Reading package lists... +Building dependency tree... +Reading state information... +Selected version '1.0' (stable [i386]) for 'libc6' +The following packages will be REMOVED: + libc6 +The following NEW packages will be installed: + libc6 +0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded. +Remv libc6 [2.0] +Inst libc6 (1.0 stable [i386]) +Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s -q=0 + + +buildsimplenativepackage 'libc6-same' 'i386' '1.0' 'stable' 'Multi-Arch: same' +buildsimplenativepackage 'libc6-same' 'amd64' '1.0' 'stable' 'Multi-Arch: same' +buildsimplenativepackage 'libc6-same' 'all' '2.0' 'testing' + +buildsimplenativepackage 'foobar-same' 'i386' '1.0' 'stable' 'Depends: libc6-same' +buildsimplenativepackage 'foobar-same' 'amd64' '1.0' 'stable' 'Depends: libc6-same' + +setupaptarchive + +aptget install libc6-same:i386 -t stable -y -qq 2>&1 > /dev/null +testdpkginstalled libc6-same + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + foobar-same +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foobar-same (1.0 stable [i386]) +Conf foobar-same (1.0 stable [i386])' aptget install foobar-same -st stable + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following extra packages will be installed: + libc6-same:amd64 +The following NEW packages will be installed: + foobar-same:amd64 libc6-same:amd64 +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst libc6-same:amd64 (1.0 stable [amd64]) +Inst foobar-same:amd64 (1.0 stable [amd64]) +Conf libc6-same:amd64 (1.0 stable [amd64]) +Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64 -st stable + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + libc6-same:amd64 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libc6-same:amd64 (1.0 stable [amd64]) +Conf libc6-same:amd64 (1.0 stable [amd64])' aptget install libc6-same:amd64 -s -t stable + +# FIXME: We should test installing libc6-same:amd64 here, but dpkg doesn't allow it currently + +# FIXME: upgrade any to all as above +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + libc6-same +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libc6-same (2.0 testing, testing [all]) +Conf libc6-same (2.0 testing, testing [all])' aptget upgrade -t testing -s +aptget upgrade -y -qq 2>&1 > /dev/null +testdpkginstalled libc6-same + +# FIXME: the display is a strange (its a downgrade), but the handling itself correct +testequal "Reading package lists... +Building dependency tree... +Reading state information... +Selected version '1.0' (stable [i386]) for 'libc6-same' +The following packages will be REMOVED: + libc6-same +The following NEW packages will be installed: + libc6-same +0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded. +Remv libc6-same [2.0] +Inst libc6-same (1.0 stable [i386]) +Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s -q=0 + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + foobar-same +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foobar-same (1.0 stable [i386]) [] +Conf foobar-same (1.0 stable [i386])' aptget install foobar-same/stable -st testing + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following NEW packages will be installed: + foobar-same:amd64 +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst foobar-same:amd64 (1.0 stable [amd64]) +Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64/stable -st testing |