From af20242585a0b4880484c5559edb7d14962918ce Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 13 Mar 2012 13:37:34 +0100 Subject: * 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) --- apt-pkg/packagemanager.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'apt-pkg') 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 */ -- cgit v1.2.3