summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-03-14 13:47:49 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-03-14 13:47:49 +0100
commit28e454d68b9cc6ba60e19dcbcfe3a97c151ef8f8 (patch)
treebfb2be0981e0dc42f224323228b582657e759a84 /cmdline/apt-get.cc
parent7db98f31498a85da22cc00e446bce8ac8c319554 (diff)
- do not show packages already marked for removal as auto-installed
Diffstat (limited to 'cmdline/apt-get.cc')
-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 430b1bccb..d1d6ab7b4 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1444,9 +1444,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 &&
@@ -1697,7 +1701,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"),