diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-12-03 18:05:52 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-12-03 18:05:52 +0100 |
commit | 6a2512be4addf9a874cc72c40d1ec56206fdd2fb (patch) | |
tree | 02aed63bc306a44a0f7b9e87bbcb0188f761d01c /cmdline/apt-get.cc | |
parent | 2c085486d34c45e123c24b0e36294245fd5bf734 (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/apt-get.cc')
-rw-r--r-- | cmdline/apt-get.cc | 17 |
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); |