4

In relation to a previous question I posed (Make apt-get (or aptitude) run with -y but not prompt for replacement of configuration files?) I came across a somewhat peculiar and hard to explain behavior. Perhaps someone can explain it still.

When I execute the following right after a debootstap inside the target chroot, package mercurial appears to require a lot more than seems logical:

apt-get -s -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install mercurial
Reading package lists...
Building dependency tree...
The following extra packages will be installed:
  ca-certificates fontconfig-config fonts-dejavu-core libdrm-intel1
  libdrm-nouveau2 libdrm-radeon1 libelf1 libfontconfig1 libfontenc1
  libfreetype6 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libice6
  libllvm3.4 libpciaccess0 libsm6 libtcl8.6 libtk8.6 libtxc-dxtn-s2tc0
  libutempter0 libx11-6 libx11-data libx11-xcb1 libxau6 libxaw7 libxcb-dri2-0
  libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-shape0 libxcb-sync1 libxcb1
  libxcomposite1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxft2 libxi6
  libxinerama1 libxmu6 libxmuu1 libxpm4 libxrandr2 libxrender1 libxshmfence1
  libxss1 libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 mercurial-common
  openssl tcl tcl8.6 tk tk8.6 x11-common x11-utils xbitmaps xterm
Suggested packages:
  libglide3 qct vim emacs kdiff3 kdiff3-qt kompare meld tkcvs mgdiff
  python-mysqldb python-pygments python-openssl tcl-tclreadline mesa-utils
  xfonts-cyrillic
Recommended packages:
  wish
The following NEW packages will be installed:
  ca-certificates fontconfig-config fonts-dejavu-core libdrm-intel1
  libdrm-nouveau2 libdrm-radeon1 libelf1 libfontconfig1 libfontenc1
  libfreetype6 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libice6
  libllvm3.4 libpciaccess0 libsm6 libtcl8.6 libtk8.6 libtxc-dxtn-s2tc0
  libutempter0 libx11-6 libx11-data libx11-xcb1 libxau6 libxaw7 libxcb-dri2-0
  libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-shape0 libxcb-sync1 libxcb1
  libxcomposite1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxft2 libxi6
  libxinerama1 libxmu6 libxmuu1 libxpm4 libxrandr2 libxrender1 libxshmfence1
  libxss1 libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 mercurial
  mercurial-common openssl tcl tcl8.6 tk tk8.6 x11-common x11-utils xbitmaps
  xterm
0 upgraded, 64 newly installed, 0 to remove and 3 not upgraded.

Looking at the output from apt-cache depends it's beyond me why apt-get decides that these dependencies have to be installed.

As you can see I am passing Dpkg options as described in the above linked question. The main intention behind it is to prevent apt-get and ultimately dpkg from prompting during what is supposed to be an automated installation.

However, I have tried running the same without passing those options and the result is the same.

1 Answer 1

12

The mercurial package recommends wish, which is a virtual package provided by tk. This is the package that is pulling in all of the X-related packages that you see being installed as dependencies in the chroot.

What you probably want to do is install mercurial without recommended packages by adding the --no-install-recommends option to apt-get. See this answer for more on avoiding installing recommended package dependencies.

4
  • thanks. Do you have any idea why it defaults to installing the recommendations, though? May 1, 2014 at 0:32
  • 1
    Recommended packages are installed by default because that is the definition of recommended. They should be installed as dependencies for most users but can be disabled if you know what you are doing. Suggested packages are dependencies that are not installed by default. May 1, 2014 at 0:35
  • 1
    I guess that's the difference between recommended and suggested then? May 1, 2014 at 0:39
  • 1
    Yes, see for example Installing suggested/recommended packages? for the difference and how to configure each. May 1, 2014 at 0:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .