summaryrefslogtreecommitdiff
path: root/apt-pkg/packagemanager.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-03-08 17:29:46 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-03-13 13:58:45 +0100
commit0caa5a4c6472d1b74444c4f38ced6c3b89fa50fe (patch)
tree1a98b30c971e28ea6086a769b906821c45822ad4 /apt-pkg/packagemanager.cc
parent9d9d5e810751954594c793383b07ca526c647350 (diff)
do not configure already unpacked packages needlessly
The unpack of a M-A:same package will force the unpack of all its siblings directly to prevent that they could be separated by later immediate actions. In commit 634985f8 a call to SmartConfigure was introduced to configure these packages at the time the installation order encounters them. Usually, the unpack order is already okay, so that this 'earlier' unpack was not needed and if it wouldn't have been done, the package would now only be unpacked, but by configuring the package now we impose new requirements which must be satisfied. The code is clever enough to handle this most of the time (it worked for 2 years!), but it isn't needed and in very coupled cases this can fail. Removing this call again removes this extra burden and so simplifies the ordering as can be seen in the modified tests. Famous last words, but I don't see a reason for this extra burden to exist hence the remove. Closes: 740843
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r--apt-pkg/packagemanager.cc17
1 files changed, 6 insertions, 11 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index 4d08fb3ba..5d6bc6bd2 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -622,6 +622,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
clog << " (replace version " << Pkg.CurrentVer().VerStr() << " with " << InstallVer.VerStr() << ")";
if (PkgLoop)
clog << " (Only Perform PreUnpack Checks)";
+ if (Immediate)
+ clog << " immediately";
clog << endl;
}
@@ -963,21 +965,14 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
for (pkgOrderList::iterator I = List->begin(); I != List->end(); ++I)
{
PkgIterator Pkg(Cache,*I);
-
+
if (List->IsNow(Pkg) == false)
{
- if (!List->IsFlag(Pkg,pkgOrderList::Configured) && !NoImmConfigure) {
- if (SmartConfigure(Pkg, 0) == false && Debug)
- _error->Warning("Internal Error, Could not configure %s",Pkg.FullName().c_str());
- // FIXME: The above warning message might need changing
- } else {
- if (Debug == true)
- clog << "Skipping already done " << Pkg.FullName() << endl;
- }
+ if (Debug == true)
+ clog << "Skipping already done " << Pkg.FullName() << endl;
continue;
-
}
-
+
if (List->IsMissing(Pkg) == true)
{
if (Debug == true)