[Bug 1912595] Re: unminimize shoud run apt with -–no-install-recommends

Robert C Jennings 1912595 at bugs.launchpad.net
Thu Jan 21 15:09:44 UTC 2021


I've discussed this issue in #ubuntu-devel on IRC[1] and the feedback is
that recommends, by policy, are installed for a reason and overriding
that should not be part of the unminimize tool.  But for your use case
there is a solution that could meet your needs.  You can set the
following in /etc/apt/apt.conf.d/:

 APT::Install-Recommends "false";

By making this change your image will install without recommends for all
apt operations which would give the behavior you're intending for
unminimize and your software stack.  Leaving that set in the image which
you give to developers would have the effect that they would install new
packages in the way that you might intend to install them in your
builds.  You can verify your configuration with the command:

 $ apt-config dump | grep Install-Recommends
 APT::Install-Recommends "false";

Recommends are installed by default (since Lucid)[2] while 'suggests'
are not installed by default.  "Recommends" by debian policy[3][4] is
used to "declares a strong, but not absolute, dependency.  The
Recommends field should list packages that would be found together with
this one in all but unusual installations."

[1] https://irclogs.ubuntu.com/2021/01/21/%23ubuntu-devel.html
[2] https://askubuntu.com/a/18553
[3] https://unix.stackexchange.com/a/77076
[4] https://www.debian.org/doc/debian-policy/ch-relationships.html#binary-dependencies-depends-recommends-suggests-enhances-pre-depends

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/1912595

Title:
  unminimize shoud run apt with -–no-install-recommends

Status in cloud-images:
  New
Status in livecd-rootfs package in Ubuntu:
  New

Bug description:
  If running unmiminize after installing packages with –-no-install-
  recommends the recommended packages are installed. (Of course only if
  the root-package is found by one of the searches.)

  To fix this it should be sufficient to add –-no-install-recommends to
  all --reinstall.

  Usecase: I have a cross-compile image with cmake being installed with
  –-no-install-recommends, as I neither need gcc nor make. This image is
  used for the CI. Based on this image, a new image is created for local
  development. When running unminimize, make and gcc with all their
  dependencies are installed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/1912595/+subscriptions



More information about the foundations-bugs mailing list