summaryrefslogtreecommitdiff
path: root/apt-pkg/packagemanager.cc
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2011-07-02 15:33:25 +0100
committerChristopher Baines <cbaines8@gmail.com>2011-07-02 15:33:25 +0100
commitcfcdf7fe9f8c925847fe8d8a18bb0996dd9391a5 (patch)
treef205095c1b7d9df6c496b100ed11d454b576c294 /apt-pkg/packagemanager.cc
parentb873565f6cdffee78d3a5a84d34b7efbda127c5b (diff)
The modification to orderlist.cc is from a patch DonKult (David) gave me, The modifications to the packagemanager should fix the test-provides-gone-with-upgrade testcase.
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r--apt-pkg/packagemanager.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index f49df8327..2219f876a 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -575,6 +575,9 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg)
}
bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate)
{
+ if (Debug == true)
+ clog << "SmartUnPack " << Pkg.Name() << endl;
+
// Check if it is already unpacked
if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure &&
Cache[Pkg].Keep() == true)
@@ -674,6 +677,20 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate)
}
}
}
+
+ // Check for breaks
+ if (End->Type == pkgCache::Dep::DpkgBreaks) {
+ SPtrArray<Version *> VList = End.AllTargets();
+ for (Version **I = VList; *I != 0; I++)
+ {
+ VerIterator Ver(Cache,*I);
+ PkgIterator Pkg = Ver.ParentPkg();
+ // Found a break, so unpack the package
+ if (List->IsNow(Pkg)) {
+ SmartUnPack(Pkg, false);
+ }
+ }
+ }
}
// Check for reverse conflicts.