summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-03-14 13:47:42 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-03-14 13:47:42 +0100
commitfd59a713400968e1e9f35a7eaeea08b58e77c53b (patch)
tree1587cbd3a7fc265ac0c2f4ded3fd702fb30549c6 /cmdline
parente4b74e4b347ccde887a3d7d8a585dcf264e13305 (diff)
* cmdline/apt-get.cc:
- do not clean the auto-flag in "remove" mode (e.g. apt-get remove already-installed-pkg) - only show packages in the auto-remove list that are not already marked for removal
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 8f4e17898..ed1ef98be 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1417,9 +1417,13 @@ bool DoAutomaticRemove(CacheFile &Cache)
if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install())
if(Debug)
std::cout << "We could delete %s" << Pkg.Name() << std::endl;
-
- autoremovelist += string(Pkg.Name()) + " ";
- autoremoveversions += string(Cache[Pkg].CandVersion) + "\n";
+
+ // only show stuff in the list that is not yet marked for removal
+ if(Cache[Pkg].Delete() == false)
+ {
+ autoremovelist += string(Pkg.Name()) + " ";
+ autoremoveversions += string(Cache[Pkg].CandVersion) + "\n";
+ }
if (doAutoRemove)
{
if(Pkg.CurrentVer() != 0 &&
@@ -1611,7 +1615,8 @@ bool DoInstall(CommandLine &CmdL)
// see if we need to fix the auto-mark flag
// e.g. apt-get install foo
// where foo is marked automatic
- if(Cache[Pkg].Install() == false &&
+ if(!Remove &&
+ Cache[Pkg].Install() == false &&
(Cache[Pkg].Flags & pkgCache::Flag::Auto))
{
ioprintf(c1out,_("%s set to manual installed.\n"),