Dont try to configure packages using SmartConfigure when not performing immediate...
authorChristopher Baines <cbaines8@gmail.com>
Sat, 16 Jul 2011 21:10:52 +0000 (22:10 +0100)
committerChristopher Baines <cbaines8@gmail.com>
Sat, 16 Jul 2011 21:10:52 +0000 (22:10 +0100)
apt-pkg/packagemanager.cc
apt-pkg/packagemanager.h

index 874472a..8112c7f 100644 (file)
@@ -166,7 +166,7 @@ bool pkgPackageManager::CreateOrderList()
    delete List;
    List = new pkgOrderList(&Cache);
    
-   static bool const NoImmConfigure = !_config->FindB("APT::Immediate-Configure",true);
+   NoImmConfigure = !_config->FindB("APT::Immediate-Configure",true);
    ImmConfigureAll = _config->FindB("APT::Immediate-Configure-All",false);
    
    if (Debug && ImmConfigureAll) 
@@ -982,11 +982,11 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
       
       if (List->IsNow(Pkg) == false)
       {
-         if (!List->IsFlag(Pkg,pkgOrderList::Configured)) {
+         if (!List->IsFlag(Pkg,pkgOrderList::Configured) && !NoImmConfigure) {
             if (SmartConfigure(Pkg) == false && Debug)
                _error->Warning("Internal Error, Could not configure %s",Pkg.Name());
             // FIXME: The above warning message might need changing
-         } else {   
+         } else {
            if (Debug == true)
               clog << "Skipping already done " << Pkg.Name() << endl;
         }
index dcc9dc2..d4a25e9 100644 (file)
@@ -48,6 +48,7 @@ class pkgPackageManager : protected pkgCache::Namespace
    pkgDepCache &Cache;
    pkgOrderList *List;
    bool Debug;
+   bool NoImmConfigure;
    bool ImmConfigureAll;
 
    /** \brief saves packages dpkg let disappear