summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/packagemanager.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index ee4798911..4c827af6d 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -536,14 +536,11 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate)
if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure &&
Cache[Pkg].Keep() == true)
{
- List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
- if (Immediate == true &&
- List->IsFlag(Pkg,pkgOrderList::Immediate) == true)
- if (SmartConfigure(Pkg) == false)
- _error->Warning(_("Could not perform immediate configuration on already unpacked '%s'. "
- "Please see man 5 apt.conf under APT::Immediate-Configure for details."),Pkg.Name());
- return true;
+ cout << "SmartUnPack called on Package " << Pkg.Name() << " but its unpacked" << endl;
+ return false;
}
+
+ bool PkgLoop = List->IsFlag(Pkg,pkgOrderList::Loop);
VerIterator const instVer = Cache[Pkg].InstVerIter(Cache);
@@ -674,7 +671,11 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate)
// Check if it needs to be unpacked
if (List->IsFlag(BrokenPkg,pkgOrderList::InList) && Cache[BrokenPkg].Delete() == false &&
- !List->IsFlag(BrokenPkg,pkgOrderList::Loop) && List->IsNow(BrokenPkg)) {
+ List->IsNow(BrokenPkg)) {
+ if (PkgLoop && List->IsFlag(BrokenPkg,pkgOrderList::Loop)) {
+ // This dependancy has already been dealt with by another SmartUnPack on Pkg
+ break;
+ }
List->Flag(Pkg,pkgOrderList::Loop);
// Found a break, so unpack the package
if (Debug)
@@ -702,6 +703,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate)
P.end() == false; P++)
CheckRConflicts(Pkg,P.ParentPkg().RevDependsList(),P.ProvideVersion());
+ if (PkgLoop) return true;
+
List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
if (instVer->MultiArch == pkgCache::Version::Same)