summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-03-13 13:37:34 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2012-03-13 13:37:34 +0100
commitaf20242585a0b4880484c5559edb7d14962918ce (patch)
treebb8cd80ca5bdb05542df90d3ba7454d6e6181d40 /apt-pkg
parente3132de87559f05f51e88fd658646e73014cab51 (diff)
* cherry pick r2222 from
http://bzr.debian.org/bzr/bzr/apt/apt/debian-experimental2/: * 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')
-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 a370f15a3..701b64af1 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -611,10 +611,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 */