diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2007-07-18 12:33:36 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2007-07-18 12:33:36 +0100 |
commit | 394eadc8e13784162fee87c8059bcc214275f4b5 (patch) | |
tree | 981c57ff5e300bbcf928dde6ee6eb185650848c3 /cmdline | |
parent | 82d0afc286514bbe8904c3436bb6580aeaa6ad66 (diff) |
- support task removal too: apt-get remove taskname^
(thanks to Matt Zimmerman reporting this problem)
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 95600ff6d..df0414076 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1507,7 +1507,8 @@ bool DoUpgrade(CommandLine &CmdL) bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, bool BrokenFix, unsigned int& ExpectedInst, - const char *taskname) + const char *taskname, + bool Remove) { const char *start, *end; pkgCache::PkgIterator Pkg; @@ -1536,7 +1537,7 @@ bool TryInstallTask(pkgDepCache &Cache, pkgProblemResolver &Fix, buf[end-start] = 0x0; if (regexec(&Pattern,buf,0,0,0) != 0) continue; - res &= TryToInstall(Pkg,Cache,Fix,false,true,ExpectedInst); + res &= TryToInstall(Pkg,Cache,Fix,Remove,true,ExpectedInst); found = true; } @@ -1604,7 +1605,7 @@ bool DoInstall(CommandLine &CmdL) // tasks must always be confirmed ExpectedInst += 1000; // see if we can install it - TryInstallTask(Cache, Fix, BrokenFix, ExpectedInst, S); + TryInstallTask(Cache, Fix, BrokenFix, ExpectedInst, S, Remove); continue; } |