summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/pkgcache.cc17
-rw-r--r--debian/changelog4
-rwxr-xr-xtest/integration/test-implicit-conflicts-real-not-virtual22
3 files changed, 34 insertions, 9 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index c854249e4..5361696d0 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -636,11 +636,18 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() const
{
if (Owner->VS->CheckDep(I.ProvideVersion(),S->CompareOp,TargetVer()) == false)
continue;
-
- if (IsNegative() == true &&
- ParentPkg()->Group == I.OwnerPkg()->Group)
- continue;
-
+
+ if (IsNegative() == true)
+ {
+ /* Provides may never be applied against the same package (or group)
+ if it is a conflicts. See the comment above. */
+ if (I.OwnerPkg()->Group == ParentPkg()->Group)
+ continue;
+ // Implicit group-conflicts should not be applied on providers of other groups
+ if (ParentPkg()->Group == TargetPkg()->Group && I.OwnerPkg()->Group != ParentPkg()->Group)
+ continue;
+ }
+
Size++;
if (Res != 0)
*End++ = I.OwnerVer();
diff --git a/debian/changelog b/debian/changelog
index 83704caeb..36b3d8340 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,10 @@ apt (0.8.16~exp10) UNRELEASED; urgency=low
* apt-pkg/depcache.cc:
- implicit conflicts (for multiarch) are supposed to conflict
only with real packages, not with virtual providers
+ * apt-pkg/pkgcache.cc:
+ - ignore implicit conflicts on providers in AllTarget, too
- -- David Kalnischkies <kalnischkies@gmail.com> Wed, 11 Jan 2012 17:59:33 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com> Fri, 13 Jan 2012 12:47:33 +0100
apt (0.8.16~exp9) experimental; urgency=low
diff --git a/test/integration/test-implicit-conflicts-real-not-virtual b/test/integration/test-implicit-conflicts-real-not-virtual
index 9d13e1709..c9fca4edf 100755
--- a/test/integration/test-implicit-conflicts-real-not-virtual
+++ b/test/integration/test-implicit-conflicts-real-not-virtual
@@ -10,6 +10,8 @@ insertpackage 'unstable-mp' 'crda' 'i386,amd64' '1.1.1-1ubuntu4mp' 'Provides: wi
Multi-Arch: foreign'
insertpackage 'unstable-m' 'crda' 'i386,amd64' '1.1.1-1ubuntu4m' 'Multi-Arch: foreign'
insertpackage 'unstable-p' 'crda' 'i386,amd64' '1.1.1-1ubuntu4p' 'Provides: wireless-crda'
+insertpackage 'unstable' 'wireless-crda' 'i386,amd64' '1.16'
+
insertinstalledpackage 'wireless-crda' 'amd64' '1.14'
@@ -19,7 +21,7 @@ testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
crda
-0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Inst crda (1.1.1-1ubuntu4m unstable-m [amd64])
Conf crda (1.1.1-1ubuntu4m unstable-m [amd64])' aptget install crda -s -t unstable-m
@@ -27,7 +29,7 @@ testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
crda
-0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Inst crda (1.1.1-1ubuntu4p unstable-p [amd64])
Conf crda (1.1.1-1ubuntu4p unstable-p [amd64])' aptget install crda -s -t unstable-p
@@ -35,6 +37,20 @@ testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
crda
-0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Inst crda (1.1.1-1ubuntu4mp unstable-mp [amd64])
Conf crda (1.1.1-1ubuntu4mp unstable-mp [amd64])' aptget install crda -s -t unstable-mp
+
+rm rootdir/var/lib/dpkg/status
+insertinstalledpackage 'crda' 'amd64' '1.1.1-1ubuntu4mp' 'Provides: wireless-crda
+Conflicts: wireless-crda (<< 1.15)
+Replaces: wireless-crda ( << 1.15)
+Multi-arch: foreign'
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ wireless-crda
+0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
+Inst wireless-crda (1.16 unstable [amd64])
+Conf wireless-crda (1.16 unstable [amd64])' aptget install wireless-crda -s -t unstable