From 6a2512be4addf9a874cc72c40d1ec56206fdd2fb Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 3 Dec 2010 18:05:52 +0100 Subject: really do not show packages in the extra section if they were requested on the commandline, e.g. with a modifier --- cmdline/apt-get.cc | 17 ++++++++--------- debian/changelog | 4 +++- test/integration/test-release-candidate-switching | 16 ---------------- 3 files changed, 11 insertions(+), 26 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); diff --git a/debian/changelog b/debian/changelog index 9d7564462..2a0b5a8cf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,10 +13,12 @@ apt (0.8.11+wheezy) unstable; urgency=low in the autoremove section and installing those (Closes: #604222) - change pkg/release behavior to use the new SetCandidateRelease so installing packages from experimental or backports is easier + - really do not show packages in the extra section if they were + requested on the commandline, e.g. with a modifier * debian/control: - add Vcs-Browser now that loggerhead works again (Closes: #511168) - -- David Kalnischkies Fri, 03 Dec 2010 17:06:28 +0100 + -- David Kalnischkies Fri, 03 Dec 2010 17:30:52 +0100 apt (0.8.10) unstable; urgency=low diff --git a/test/integration/test-release-candidate-switching b/test/integration/test-release-candidate-switching index ea601ae8b..5736945ab 100755 --- a/test/integration/test-release-candidate-switching +++ b/test/integration/test-release-candidate-switching @@ -39,7 +39,6 @@ insertpackage 'experimental' 'amarok-higher' 'i386' '2.3.2-2+exp' 'Depends: amar insertpackage 'experimental' 'amarok-null' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-xine (= 1:1.0-1) | phonon-backend, libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' insertpackage 'experimental' 'amarok-null2' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-null (= 1:1.0-1) | phonon-backend, libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' -insertpackage 'experimental' 'amarok-null2' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-null (= 1:1.0-1) | phonon-backend, libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' insertpackage 'experimental' 'amarok-xine' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-xine (= 5:4.6.0+exp) | phonon-backend-null (= 5:4.20.0+exp), libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' insertpackage 'experimental' 'amarok-xine2' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-xine2 (= 5:4.6.0+exp) | phonon-backend-null (= 5:4.20.0+exp), libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' insertpackage 'experimental' 'amarok-xine3' 'i386' '2.3.2-2+exp' 'Depends: amarok-common (= 2.3.2-2+exp), phonon-backend-xine3 (= 5:4.6.0+exp) | phonon-backend-null (= 5:4.20.0+exp), libmtp8 (>= 0.3.1), libc6, amarok-utils (= 2.3.2-2+exp)' @@ -99,7 +98,6 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok' Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok' The following extra packages will be installed: - amarok (2.3.2-2+exp) amarok-common (2.3.2-2+exp) amarok-utils (2.3.2-2+exp) libc6 (2.11.2-7+sid) @@ -123,7 +121,6 @@ Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-null' The following extra packages will be installed: amarok-common (2.3.2-2+exp) - amarok-null (2.3.2-2+exp) amarok-utils (2.3.2-2+exp) libc6 (2.11.2-7+sid) libmtp8 (0.3.1+sid) @@ -147,9 +144,7 @@ Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null' The following extra packages will be installed: - amarok (2.3.2-2+exp) amarok-common (2.3.2-2+exp) - amarok-null (2.3.2-2+exp) amarok-utils (2.3.2-2+exp) libc6 (2.11.2-7+sid) libmtp8 (0.3.1+sid) @@ -180,8 +175,6 @@ Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine' b Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-higher' The following extra packages will be installed: amarok-common (2.3.2-2+exp) - amarok-higher (2.3.2-2+exp) - amarok-less (2.3.2-2+exp) amarok-utils (2.3.2-2+exp) libc6 (2.11.2-7+sid) libmtp8 (0.3.1+sid) @@ -206,7 +199,6 @@ Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-null2' The following extra packages will be installed: amarok-common (2.3.2-2+exp) - amarok-null2 (2.3.2-2+exp) amarok-utils (2.3.2-2+exp) libc6 (2.11.2-7+sid) libmtp8 (0.3.1+sid) @@ -232,7 +224,6 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because The following extra packages will be installed: amarok-common (2.3.2-2+exp) amarok-utils (2.3.2-2+exp) - amarok-xine (2.3.2-2+exp) libc6 (2.11.2-7+sid) libmtp8 (0.3.1+sid) phonon-backend-xine (4.6.0+exp) @@ -257,7 +248,6 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because The following extra packages will be installed: amarok-common (2.3.2-2+exp) amarok-utils (2.3.2-2+exp) - amarok-xine2 (2.3.2-2+exp) libc6 (2.11.2-7+sid) libmtp8 (0.3.1+sid) phonon-backend-null (4.20.0+exp) @@ -283,7 +273,6 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because The following extra packages will be installed: amarok-common (2.3.2-2+exp) amarok-utils (2.3.2-2+exp) - amarok-xine3 (2.3.2-2+exp) intermediatepkg (2.0) libc6 (2.11.2-7+sid) libmtp8 (0.3.1+sid) @@ -310,7 +299,6 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because The following extra packages will be installed: amarok-common (2.3.2-2+exp) amarok-utils (2.3.2-2+exp) - amarok-xine4 (2.3.2-2+exp) libc6 (2.11.2-7+sid) libmtp8 (0.3.1+sid) phonon-backend-null (4.20.0+exp) @@ -333,7 +321,6 @@ Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-broken' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-broken' The following extra packages will be installed: - amarok-broken (2.3.2-2+exp) amarok-common (2.3.2-2+exp) amarok-utils (2.3.2-2+exp) libc6 (2.11.2-7+sid) @@ -358,7 +345,6 @@ Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-recommends' The following extra packages will be installed: amarok-common (2.3.2-2+exp) - amarok-recommends (2.3.2-2+exp) amarok-utils (2.3.2-2+exp) libc6 (2.11.2-7+sid) libmtp8 (0.3.1+sid) @@ -381,7 +367,6 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends' Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends' The following extra packages will be installed: amarok-common (2.3.2-2+exp) - amarok-recommends (2.3.2-2+exp) Recommended packages: amarok-utils (2.3.1-1+sid) phonon-backend-xine (4.6.0really4.4.2-1+sid) @@ -403,7 +388,6 @@ Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends2' Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends2' The following extra packages will be installed: amarok-common (2.3.2-2+exp) - amarok-recommends2 (2.3.2-2+exp) libc6 (2.11.2-7+sid) libmtp8 (0.3.1+sid) phonon-backend-xine (4.6.0really4.4.2-1+sid) -- cgit v1.2.3