summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-12-03 18:05:52 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-12-03 18:05:52 +0100
commit6a2512be4addf9a874cc72c40d1ec56206fdd2fb (patch)
tree02aed63bc306a44a0f7b9e87bbcb0188f761d01c /cmdline
parent2c085486d34c45e123c24b0e36294245fd5bf734 (diff)
really do not show packages in the extra section if they were
requested on the commandline, e.g. with a modifier
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 476896322..67fc4dc25 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1873,16 +1873,15 @@ bool DoInstall(CommandLine &CmdL)
pkgCache::PkgIterator I(Cache,Cache.List[J]);
if ((*Cache)[I].Install() == false)
continue;
+ pkgCache::VerIterator Cand = Cache[I].CandidateVerIter(Cache);
+ if (Cand.Pseudo() == true)
+ continue;
- const char **J;
- for (J = CmdL.FileList + 1; *J != 0; J++)
- if (strcmp(*J,I.Name()) == 0)
- break;
-
- if (*J == 0) {
- List += I.FullName(true) + " ";
- VersionsList += string(Cache[I].CandVersion) + "\n";
- }
+ if (verset[MOD_INSTALL].find(Cand) != verset[MOD_INSTALL].end())
+ continue;
+
+ List += I.FullName(true) + " ";
+ VersionsList += string(Cache[I].CandVersion) + "\n";
}
ShowList(c1out,_("The following extra packages will be installed:"),List,VersionsList);