Hardy recommends handling

It looks like a feature of package handling in Hardy is going to be a little different. This might come into play if you try to conserve disk space, or if you’re like me and you resent aptitude’s tendency to rake in all kinds of rubbish for one tiny application.

I’ll apologize ahead of time because most of the discussion about this is going on inside the staff area on the Ubuntu forums, so I can’t directly link to it. But here’s the situation as it is now, and as I understand it.

Aptitude, from the command line or from the console interface (you did know there was a console interface, right? 😯 ), defaults in Gutsy and earlier releases to install recommended packages by default. (If you don’t know what that term means, refresh your memory with this introduction.) That much is common knowledge; I’ve mentioned it plenty of times in the Feisty and Gutsy guides, and elsewhere here.

However, that behavior was turned off for apt and apt-get except for metapackages. So the basic behavior, for Gutsy and earlier was this.

  1. Installing a package with aptitude drew in the package and its dependencies, along with recommended software
  2. Installing a package with apt-get drew in only the package and its dependencies
  3. Installing a metapackage with apt-get drew in the package, its dependencies and recommended software

Of course, you could manually configure aptitude to ignore those recommendations, or apt, or apt-get, or whatever. You do have choice.

Then around the first of October, Debian began to follow its own guidelines a little more strictly, making a clearer line between “recommends” and “suggests.” It was avoided in the past because some packages were marked “recommends,” when they really should have been “suggests.” (Or vice-versa, perhaps. πŸ˜‰ )

And of course, Ubuntu is going to follow that policy, making sure apt and apt-get behave similarly, and the switchover is slated for Hardy.

So what’s this all mean? Well, if you’re a casual Ubuntu user, it doesn’t mean a thing. In fact, it will probably be a slight improvement, since installing packages will draw in additional dependencies that will “flesh out” the software you’re installing. That’s a good thing. You’ll probably have more options for your program, like … say … more file format conversion options for a image viewer, or something like that.

On the other hand, if you’re working with an older, smaller system (like pre-1998), or if you’re just a whacko like me and don’t like all the unnecessary kludge on your system, it means you’ll also have to tune apt-get to avoid drawing them in — but only if you use apt-get regularly. If you already use aptitude and you’re used to turning off the recommends behavior, it probably won’t bother you.

This behavior might also come into play in a full-upgrade (a dist-upgrade, if you’re not familiar with the new jargon), when moving from Gutsy to Hardy. You can probably imagine that scenario.

Now the added wrinkle: Bug report 128681. For some people, aptitude’s behavior in Gutsy is now drawing in recommended packages, despite turning off that feature from within aptitude itself. (I haven’t had a chance to check this on my own machine, although some people have confirmed that bug.)

That issue apparently stems from apt’s preconfiguration to install recommended packages, regardless of what aptitude, or apt-get, is told. And if you double-check inside your /etc/apt/apt.conf.d/01autoremove file, you might see that is the case (again, I haven’t had the chance to double-check that, so it might be slightly different from what I’m describing).

For now, a few forumgoers have come up with a solution for hard-wiring that configuration file and preventing aptitude or apt-get from grabbing everything without regard for its instructions. maybeway36 has written a terse howto for reversing that “bug” behavior, and keeping a system light. Essentially you trim part of that configuration file, although I strongly recommend commenting out those lines, not deleting them.

I think that’s the situation, as it stands now. I may have misunderstood some parts or confused myself in the writing of it; if it looks suspicious let me know and I’ll try to sort it all out again. I should have a chance to test these things myself tomorrow or Friday, and if necessary I’ll update the Gutsy guide with what I find.


4 thoughts on “Hardy recommends handling

  1. Dr Small

    Quite interesting. I have lots of disc space though, so it won’t bother me none, but I understand your point about pre-1998 systems.

    Anyhow, what about this Console Interface ?

  2. Onyros

    Jeez. One of the reasons I casually preferred apt-get over aptitude was that default behaviour. I like to choose everything, I hate all-encompassing defaults.

    Looks like I’ll have to tweak aptitude to avoid pulling recommended (oh!, and what about the humungs difference in terms of semantics over “suggested”?) packages.

    That’s why I love Arch. THAT is total freedom: I like being recommended stuff, that’s true; but I prefer the (default) choice between following the recommendation (or is suggestion? heh) or not… I don’t like being “force-fed” anything.

    Arch does that even with metapackages (like when one installs GNOME – “pacman -S gnome” and you’ll have the choice to either install everything or to choose what you want, package by package. Now, THAT’s a default I can live with.

  3. K.Mandla Post author

    @DrSmall: πŸ˜‰ Type sudo aptitude in a terminal and you get a prehistoric version of Synaptic that does everything it’s GTK2 cousin does, all in ncurses. πŸ˜‰ Fun, huh?

  4. Dr Small

    Ah, Ok! I remember that now. I just never knew it was called a Console πŸ™‚
    I used to play in aptitude like that in the beginning πŸ˜€


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s