On Fr, 2010-08-06 at 11:04 -0400, Lucas Nussbaum wrote: > On 06/08/10 at 11:35 +0200, Julian Andres Klode wrote: > > On Fr, 2010-08-06 at 02:40 -0400, Lucas Nussbaum wrote: > > > Package: apt > > > Version: 0.7.25.3 > > > Severity: serious > > > > > > Hi, > > > > > > I have been testing upgrades from lenny to sid with a tool similar to > > > piuparts. I ran into many (~80) strange failures, where apt takes a > > > wrong decision about which packages to upgrade. > > > > > > All the logs are available from > > > http://people.debian.org/~lucas/logs/2010/08/05/pkg-upgrade/ > > > Here are the various cases: > > > package-not-upgraded/: > > > The package under test was not upgraded during apt-get dist-upgrade. > > > That is always because upgrading it would have required the removal of > > > another package. However, in the case of library packages being removed > > > to permit the upgrade, I was wondering whether it was possible to trick > > > apt into upgrading the package. > > > > > > package-uninstalled/: > > > The package under test was removed during apt-get dist-upgrade. > > > > > > package-uninstalled/no-removal/ <= that's where the serious issues are > > > The package under test was removed during dist-upgrade, but no removal > > > was neded to get it back! It should really have been upgraded together > > > with the other packages. > > > There are quite a lot of failures related to emacs packages, so they > > > are separated in the logs. > > > > > > package-uninstalled/removals/: > > > A package was removed to permit the upgrade. I'm wondering if in some > > > cases, it would have made sense to auto-detect the correct solution. > > > > Please use a two stage upgrade process: > > apt-get upgrade > > apt-get dist-upgrade > > This will reduce the number of issues. > > I'm now doing: > apt-get install apt (to upgrade apt) > apt-get upgrade > apt-get dist-upgrade > And I don't really see any difference (I haven't tested all the packages > that were failing). > > Good examples of packages that fail are pyrex-mode and > python-application. Both get removed during apt-get dist-upgrade, but > can be installed without removing any package after that. > At least those two work now with the latest commit in debian-experimental-ma.
------------------------------------------------------------ revno: 2032 committer: Julian Andres Klode <j...@debian.org> branch nick: debian-experimental-ma timestamp: Fri 2010-08-06 23:33:55 +0200 message: * apt-pkg/depcache.cc: - Only try upgrade for Breaks if there is a newer version, otherwise handle it as Conflicts (by removing it) (helps for #591881). diff: === modified file 'apt-pkg/depcache.cc' --- apt-pkg/depcache.cc 2010-07-14 20:59:43 +0000 +++ apt-pkg/depcache.cc 2010-08-06 21:33:55 +0000 @@ -1425,10 +1425,13 @@ VerIterator Ver(*this,*I); PkgIterator Pkg = Ver.ParentPkg(); - if (Start->Type != Dep::DpkgBreaks) + + + if (PkgState[Pkg->ID].CandidateVer != *I && + Start->Type == Dep::DpkgBreaks) + MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps); + else MarkDelete(Pkg,false,Depth + 1, false); - else if (PkgState[Pkg->ID].CandidateVer != *I) - MarkInstall(Pkg,true,Depth + 1, false, ForceImportantDeps); } continue; } === modified file 'debian/changelog' --- debian/changelog 2010-08-02 19:02:01 +0000 +++ debian/changelog 2010-08-06 21:33:55 +0000 @@ -8,6 +8,11 @@ * apt-pkg/cdrom.cc: - fix off-by-one error in DropBinaryArch + [ Julian Andres Klode ] + * apt-pkg/depcache.cc: + - Only try upgrade for Breaks if there is a newer version, otherwise + handle it as Conflicts (by removing it) (helps for #591881). + -- Michael Vogt <michael.v...@ubuntu.com> Fri, 30 Jul 2010 17:37:14 +0200 apt (0.7.26~exp12) experimental; urgency=low -- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org