summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-02-03 15:37:41 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-02-03 15:37:41 +0100
commit931dcf2f960c6a2b117ab3cc847ce51c04e2140c (patch)
tree633dd1ca8e7e40cfa25d6227d9859b04bd9d1fad /apt-pkg/algorithms.cc
parent7763525dea18d978a1df8eee4a517314ae49ca71 (diff)
parent7c748f4aa1bd47089672353fd1a401d1c5c94723 (diff)
merged from the debian-sid branch
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 9abb7a947..0fbce3c2a 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -374,6 +374,13 @@ bool pkgDistUpgrade(pkgDepCache &Cache)
{
pkgDepCache::ActionGroup group(Cache);
+ /* Upgrade all installed packages first without autoinst to help the resolver
+ in versioned or-groups to upgrade the old solver instead of installing
+ a new one (if the old solver is not the first one [anymore]) */
+ for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I)
+ if (I->CurrentVer != 0)
+ Cache.MarkInstall(I, false, 0, false);
+
/* Auto upgrade all installed packages, this provides the basis
for the installation */
for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)