Hi Guillem, I noticed the change below in the latest version of your branch. This effectively removes the cross-grading failure that Sven Joachim reported but I'm concerned about the implications.
Most of the upgrade code has been written under the assumption that an upgrade always works with the same pkginfo (with the new package in pkg.available). Allowing the cross-grade here means that we have upgrades where the relevant pkg.installed and pkg.available are no longer in the same pkginfo struct. So this change will break other stuff. You need to carefully review other parts of the code with this in mind. Given this is a change in the underlying specifications used during my development, it obviously breaks my test suite. FWIW, we had a discussion on this topic on February but you did not took position at this time: http://lists.debian.org/debian-dpkg/2011/02/msg00040.html My personal preference at this point would be to get full cross-grading support in a second step and finalize what's already working correctly. We really need to have a multiarch enabled dpkg in sid before Christmas. And such a fundamental change does not really help. Cheers, @@ -516,20 +531,20 @@ void process_archive(const char *filename) { * that we need. */ pkg->clientdata->istobe= itb_installnew; + /* Check if the new package can either be co-installed, installed anew or + * replaced (or cross-graded). */ + if (pkg->available.multiarch != multiarch_same && + pkg_installed_instances(pkg->set) > 1) + ohshit(_("%s %s (Multi-Arch: %s) is not co-installable with " + "%s which currently has multiple installed instances"), + pkg_name(pkg, pno_always), + versiondescribe(&pkg->available.version, vdew_nonambig), + multiarchinfos[pkg->available.multiarch].name, + pkg_name(pkg, pno_never)); + for (otherpkg = &pkg->set->pkg; otherpkg; otherpkg = otherpkg->arch_next) { if (otherpkg == pkg || otherpkg->status < stat_halfinstalled) continue; - /* Look for other instances of the same package that can't coexist */ - if (otherpkg->installed.multiarch != multiarch_same || - pkg->available.multiarch != multiarch_same) - ohshit(_("%s %s (Multi-Arch: %s) is not co-installable with %s " - "%s (Multi-Arch: %s) which is currently installed"), - pkg_name(pkg, pno_always), - versiondescribe(&pkg->available.version, vdew_nonambig), - multiarchinfos[pkg->available.multiarch].name, - pkg_name(otherpkg, pno_always), - versiondescribe(&otherpkg->installed.version, vdew_nonambig), - multiarchinfos[otherpkg->installed.multiarch].name); /* Deconfigure them if they are not in sync */ if (versioncompare(&pkg->available.version, &otherpkg->installed.version) && otherpkg->status > stat_halfconfigured) { -- Raphaël Hertzog ◈ Writer/Consultant ◈ Debian Developer Pre-order a copy of The Debian Administrator's Handbook and help liberate it: http://debian-handbook.info/liberation/ -- To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20111213085501.ga4...@rivendell.home.ouaza.com