Image of the glider from the Game of Life by John Conway
Skip to content

Aptitude Madness

I always use the "-R" or "--without-recommends", and this is why:

root@yin:~# aptitude install virtinst
The following NEW packages will be installed:
  acl{a} colord{a} consolekit{a} dconf-gsettings-backend{a} dconf-service{a} fontconfig{a} fontconfig-config{a}
  hicolor-icon-theme{a} libatk1.0-0{a} libatk1.0-data{a} libcairo-gobject2{a} libcairo2{a} libck-connector0{a}
  libcolord1{a} libcups2{a} libdatrie1{a} libdbus-glib-1-2{a} libdconf0{a} libdrm-intel1{a} libdrm-nouveau1a{a}
  libdrm-radeon1{a} libdrm2{a} libexif12{a} libfdt1{a} libfile-copy-recursive-perl{a} libfontconfig1{a}
  libgd2-xpm{a} libgdk-pixbuf2.0-0{a} libgdk-pixbuf2.0-common{a} libgl1-mesa-dri{a} libgl1-mesa-glx{a}
  libglapi-mesa{a} libgphoto2-2{a} libgphoto2-l10n{a} libgphoto2-port0{a} libgtk-3-0{a} libgtk-3-bin{a}
  libgtk-3-common{a} libgtk-vnc-2.0-0{a} libgudev-1.0-0{a} libgusb2{a} libgvnc-1.0-0{a} libieee1284-3{a}
  libjasper1{a} libjbig0 liblcms2-2{a} libltdl7{a} libpam-ck-connector{a} libpango1.0-0{a} libpolkit-agent-1-0{a}
  libpolkit-backend-1-0{a} libpolkit-gobject-1-0{a} libsane{a} libsane-common{a} libsane-extras{a}
  libsane-extras-common{a} libthai-data{a} libthai0{a} libtiff4{a} libv4l-0{a} libv4lconvert0{a} libvde0{a}
  libxcb-glx0{a} libxcb-render0{a} libxcb-shm0{a} libxcomposite1{a} libxcursor1{a} libxdamage1{a} libxen-4.1{a}
  libxfixes3{a} libxft2{a} libxinerama1{a} libxpm4{a} libxrandr2{a} libxrender1{a} libxxf86vm1{a} openbios-ppc{a}
  openbios-sparc{a} openhackware{a} policykit-1{a} python-libvirt{a} python-libxml2{a} python-pycurl{a}
  python-urlgrabber{a} qemu{a} qemu-system{a} qemu-user{a} sane-utils{a} ttf-dejavu-core{a} update-inetd{a}
  vde2{a} virt-viewer{a} virtinst
0 packages upgraded, 93 newly installed, 0 to remove and 0 not upgraded.
Need to get 96.3 MB of archives. After unpacking 301 MB will be used.
Do you want to continue? [Y/n/?]

Consider it without recommends:

root@yang:~# aptitude -R install virtinst
The following NEW packages will be installed:
  python-libvirt{a} python-libxml2{a} python-pycurl{a} python-urlgrabber{a} virtinst
The following packages are RECOMMENDED but will NOT be installed:
  qemu virt-viewer
0 packages upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,258 kB of archives. After unpacking 5,403 kB will be used.
Do you want to continue? [Y/n/?]

5 packages versus 93. 2 MB versus 96 MB. That is all.

{ 6 } Comments

  1. Andreas Olsson using Opera 9.80 on GNU/Linux 64 bits | June 14, 2012 at 7:58 am | Permalink

    May I suggest the following apt config?

    APT::Install-Recommends "false";

  2. Aaron Toponce using Google Chrome 18.0.1025.168 on GNU/Linux 64 bits | June 14, 2012 at 8:14 am | Permalink

    Thanks for the recommendation. Doesn't change the draconian nature of installing recommends by default.

  3. Andreas Olsson using Opera 9.80 on GNU/Linux 64 bits | June 14, 2012 at 8:59 am | Permalink

    Myself I am kind of thorn regarding installing Recommends by default. Apart from the illustrated problems, it does have the benefit of making it easier to move stuff from being Dependencies to being Recommends, allowing you to either skip all the Recommends, or afterwards removing a few Recommended packages, without forcing the original package to be removed.

  4. Soren Hansen using Google Chrome 18.0.1025.168 on GNU/Linux 64 bits | June 14, 2012 at 6:11 pm | Permalink

    I'm not sure what the problem you're alluding to is.

    Without those recommended packages, it's unlikely that you'll be able to use virtinst for anything useful:

    * You've refused to let it install a hypervisor, so you can only do remote installs. This is almost never what anyone wants to do with virtinst.
    * Even if you happened to already have a hypervisor installed (or if you specificed it explicitly in the apt-get command), you would only be able to do automated installs, because you've refused to let it install virt-viewer (needed to connect you to the console of the VM being installed).
    * Had you not already had bridge-utils installed, you wouldn't be able to connect your VM's to the network, but be stuck with user-mode networking. Noone wants user-mode networking.

    So yes, congratulations, you've installed a piece of software which is useless for all but niche use cases. Meanwhile, the rest of us enjoy things being useful by default.

  5. Aaron Toponce using Google Chrome 18.0.1025.168 on GNU/Linux 64 bits | June 15, 2012 at 12:14 am | Permalink

    A niche? All I want is virt-install. I just want the ability to create virtual machines in the command line, without virt-manager. So, I'm curious why installing the virtinst package, which provides virt-install, is a niche use case. So, feel free to install colord, libxinerama1, sane-utils so you can install virtual machines. I'll stick with just the software that is actually needed to pull off the function, and not provide a ton of bloat.

    And what's all this talk about refusing to install a hypervisor, virt-viewer or bridge-utils? I have KVM installed, as well as bridge-utils. How else am I supposed to build out a hypervisor? And why do I need virt-viewer on the hypervisor? It's a client package, and an unnecessary one at that. Using virt-manager, you can get access to the console of the VM just fine. Even using "virsh console" on the server works. So, I'm not exactly sure what you're saying.

  6. Soren Hansen using Google Chrome 18.0.1025.168 on GNU/Linux 64 bits | June 20, 2012 at 12:59 am | Permalink

    I never said installing virtinst is a niche use case. I'm not sure where you're getting that.

    I'm saying that installing only virtinst and its strict dependencies indeed does give you a tool that can perform some function, namely performing unattended installations of a networking impaired operating system on a remote hypervisor. I maintain that this is a niche use case.

    Sure, you can manually install kvm and bridge-utils etc. and actually end up with a complete toolset that will be useful. I just believe it's better to give users what they *probably* want, assuming they're anything like 95% of other users of the package, rather than leave them guessing at that set of packages.

    As for your argument about virt-viewer being a client package and hence being unnecessary... What do you think virt-install is?

Post a Comment

Your email is never published nor shared.

Switch to our mobile site