summaryrefslogtreecommitdiff
path: root/apt-pkg/packagemanager.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-03-06 14:06:38 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2012-03-06 14:06:38 +0100
commite2625f67efae93c2c8affff41ce3e5fb9a507f30 (patch)
treeb3013f5bd4de3a7c2e59d6bda5d508f73721120d /apt-pkg/packagemanager.cc
parent22d9031d52d2c96c1457346580050edf2814cdc9 (diff)
parentb3887af24029cdc6179470fcb8587fff39a3eee9 (diff)
* apt-pkg/packagemanager.cc:
- fix bug in predepends handling - ensure that packages that needs unpackaging are unpacked before they are configured (LP: #927993)
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r--apt-pkg/packagemanager.cc17
1 files changed, 13 insertions, 4 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index d8e9621a4..0e4595735 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -612,10 +612,19 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
continue;
}
- if (Debug)
- clog << OutputInDepth(Depth) << "Trying to SmartConfigure " << Pkg.Name() << endl;
- Bad = !SmartConfigure(Pkg, Depth + 1);
- }
+ // check if it needs unpack or if if configure is enough
+ if (!List->IsFlag(Pkg,pkgOrderList::UnPacked))
+ {
+ if (Debug)
+ clog << OutputInDepth(Depth) << "Trying to SmartUnpack " << Pkg.Name() << endl;
+ // SmartUnpack with the ImmediateFlag to ensure its really ready
+ Bad = !SmartUnPack(Pkg, true, Depth + 1);
+ } else {
+ if (Debug)
+ clog << OutputInDepth(Depth) << "Trying to SmartConfigure " << Pkg.Name() << endl;
+ Bad = !SmartConfigure(Pkg, Depth + 1);
+ }
+ }
/* If this or element did not match then continue on to the
next or element until a matching element is found */