The following commit has been merged in the master branch: commit ae61affca427ed53e33eff589af0356b6e951a21 Author: Raphaël Hertzog <hert...@debian.org> Date: Mon Feb 21 12:23:19 2011 +0100
dpkg: Ignore conflict with one's own virtual package within a package set It's common for packages to “Provides: foo” and “Conflicts: foo” when taking over another package. This self-conflict is explicitly ignored by dpkg. Now if multiple instances of a “Multi-Arch: same” package do this, it should still be allowed. Update the checks accordingly both in dpkg and in dselect. Sponsored-by: Linaro Limited Signed-off-by: Guillem Jover <guil...@debian.org> diff --git a/dselect/pkgdepcon.cc b/dselect/pkgdepcon.cc index 7262d19..3408c49 100644 --- a/dselect/pkgdepcon.cc +++ b/dselect/pkgdepcon.cc @@ -404,6 +404,8 @@ packagelist::deppossatisfied(deppossi *possi, perpackagestate **fixbyupgrade) provider; provider = provider->rev_next) { if (provider->up->type == dep_provides && + ((possi->up->type != dep_conflicts && possi->up->type != dep_breaks) || + provider->up->up->set != possi->up->up->set) && provider->up->up->clientdata && !useavailable(provider->up->up) && would_like_to_install(provider->up->up->clientdata->selected, @@ -414,6 +416,8 @@ packagelist::deppossatisfied(deppossi *possi, perpackagestate **fixbyupgrade) provider; provider = provider->rev_next) { if (provider->up->type != dep_provides || + ((possi->up->type == dep_conflicts || possi->up->type == dep_breaks) && + provider->up->up->set == possi->up->up->set) || !provider->up->up->clientdata || !would_like_to_install(provider->up->up->clientdata->selected, provider->up->up)) diff --git a/src/depcon.c b/src/depcon.c index c577b3a..863157c 100644 --- a/src/depcon.c +++ b/src/depcon.c @@ -493,7 +493,7 @@ depisok(struct dependency *dep, struct varbuf *whynot, provider = provider->rev_next) { if (provider->up->type != dep_provides) continue; if (provider->up->up->clientdata->istobe != itb_installnew) continue; - if (provider->up->up == dep->up) + if (provider->up->up->set == dep->up->set) continue; /* Conflicts and provides the same. */ sprintf(linebuf, _(" %.250s provides %.250s and is to be installed.\n"), provider->up->up->set->name, possi->ed->name); @@ -510,7 +510,7 @@ depisok(struct dependency *dep, struct varbuf *whynot, provider = provider->rev_next) { if (provider->up->type != dep_provides) continue; - if (provider->up->up == dep->up) + if (provider->up->up->set == dep->up->set) continue; /* Conflicts and provides the same. */ switch (provider->up->up->clientdata->istobe) { -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org