From: Michael Vogt Date: Fri, 8 Jun 2007 23:44:03 +0000 (+0200) Subject: * merged from apt--mvo X-Git-Tag: 0.7.21~277 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/f32484472374cb6c93fef0cd4ee9f71a7b80ec8a?hp=-c * merged from apt--mvo --- f32484472374cb6c93fef0cd4ee9f71a7b80ec8a diff --combined cmdline/apt-get.cc index 1dcbbfc5b,e9b619787..554677f39 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@@ -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); @@@ -1595,6 -1596,18 +1595,18 @@@ 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 @@@ -1743,10 -1756,8 +1755,8 @@@ 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 */