diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2024-04-12 15:10:20 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2024-04-12 16:01:02 +0200 |
commit | 275ee5afe968e77d8379f0f3b6dc54c6239aa4f6 (patch) | |
tree | 334c414de4e080d3ae8c2f0da5c5b3d77ef8481c | |
parent | d3274a11d9e153cd996b89436b01d00b218a4985 (diff) |
Only show Recommends/Suggests for new installs, not upgrades
This makes things more useful in combination with the upgrade
command, but introduces a subtle change seen in the test suite
when you use the install command to upgrade packages.
-rw-r--r-- | apt-private/private-install.cc | 2 | ||||
-rwxr-xr-x | test/integration/test-bug-470115-new-and-tighten-recommends | 2 | ||||
-rwxr-xr-x | test/integration/test-ubuntu-bug-614993 | 4 |
3 files changed, 1 insertions, 7 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index 26b81b052..3efae0112 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -923,7 +923,7 @@ static void ShowWeakDependencies(CacheFile &Cache) for (auto const &Pkg: Universe) { /* Just look at the ones we want to install */ - if ((*Cache)[Pkg].Install() == false) + if ((*Cache)[Pkg].NewInstall() == false) continue; // get the recommends/suggests for the candidate ver diff --git a/test/integration/test-bug-470115-new-and-tighten-recommends b/test/integration/test-bug-470115-new-and-tighten-recommends index f27990e3e..e1c272b18 100755 --- a/test/integration/test-bug-470115-new-and-tighten-recommends +++ b/test/integration/test-bug-470115-new-and-tighten-recommends @@ -165,8 +165,6 @@ Conf upgrade-over-new (2 unstable [all])' aptget install upgrade-over-new -s # the user doesn't seem to need it so avoid upgrading it testsuccessequal 'Reading package lists... Building dependency tree... -Recommended packages: - cool The following packages will be upgraded: now-satisfiable 1 upgraded, 0 newly installed, 0 to remove and 12 not upgraded. diff --git a/test/integration/test-ubuntu-bug-614993 b/test/integration/test-ubuntu-bug-614993 index 542e55105..fe830b499 100755 --- a/test/integration/test-ubuntu-bug-614993 +++ b/test/integration/test-ubuntu-bug-614993 @@ -28,10 +28,6 @@ The following additional packages will be installed: xserver-xorg-video-sisusb xserver-xorg-video-tdfx xserver-xorg-video-trident xserver-xorg-video-tseng xserver-xorg-video-vesa xserver-xorg-video-vmware xserver-xorg-video-voodoo -Suggested packages: - xfonts-scalable gpointing-device-settings touchfreeze firmware-linux -Recommended packages: - xauth intel-gpu-tools The following packages will be REMOVED: xserver-xorg-video-v4l The following NEW packages will be installed: |