]> git.saurik.com Git - apt.git/commitdiff
* merged from apt--mvo
authorMichael Vogt <egon@bottom>
Fri, 8 Jun 2007 23:44:03 +0000 (01:44 +0200)
committerMichael Vogt <egon@bottom>
Fri, 8 Jun 2007 23:44:03 +0000 (01:44 +0200)
1  2 
cmdline/apt-get.cc

diff --combined cmdline/apt-get.cc
index 1dcbbfc5badad255a3ed3b193b67c6974fc8f17b,e9b619787ac9e1c45511a39af0bb189fe9bcdeb5..554677f39da64df196fe2f5bd4b4a167d3c88873
@@@ -1535,7 -1535,7 +1535,7 @@@ bool TryInstallTask(pkgDepCache &Cache
        buf[end-start] = 0x0;
        if (regexec(&Pattern,buf,0,0,0) != 0)
         continue;
-       res &= TryToInstall(Pkg,Cache,Fix,false,BrokenFix,ExpectedInst);
+       res &= TryToInstall(Pkg,Cache,Fix,false,true,ExpectedInst);
        found = true;
     }
     
@@@ -1579,6 -1579,7 +1579,6 @@@ bool DoInstall(CommandLine &CmdL
        _config->Set("APT::Get::AutomaticRemove", "true");
        DefRemove = true;
     }
 -
     // new scope for the ActionGroup
     {
        pkgDepCache::ActionGroup group(Cache);
         bool Remove = DefRemove;
         char *VerTag = 0;
         bool VerIsRel = false;
+          // this is a task!
+          if (Length >= 1 && S[Length - 1] == '^')
+          {
+             S[--Length] = 0;
+             // tasks must always be confirmed
+             ExpectedInst += 1000;
+             // see if we can install it
+             TryInstallTask(Cache, Fix, BrokenFix, ExpectedInst, S);
+             continue;
+          }
         while (Cache->FindPkg(S).end() == true)
         {
            // Handle an optional end tag indicating what to do
         return _error->Error(_("Broken packages"));
        }   
     }
-    if (_config->FindB("APT::Get::AutomaticRemove")) {
-       if (!DoAutomaticRemove(Cache)) 
-        return false;
-    }
+    if (!DoAutomaticRemove(Cache)) 
+       return false;
  
     /* Print out a list of packages that are going to be installed extra
        to what the user asked */