[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "Hold"ing non-installed packages



On 09/03/2012 02:36 PM, Andrei POPESCU wrote:

On Lu, 03 sep 12, 13:57:17, The Wanderer wrote:

Is there any way to tell apt to "hold" a particular package in a
non-installed state?

Several, but the easiest would be to pin it to a priority smaller than 0, see
apt_preferences(5) for more info. However for your case it might be easier to
find the real culprit, see below.

I think I tried that, but it didn't work for some reason. If this comes up
again, I may give it another try, to see if I can track down the problem.

Having previously encountered problems due to having tried to dist-upgrade
across a long gap, I perform a dist-upgrade to testing on the order of
weekly. When apt-listbugs reports a bug which is important enough for me to
want to hold off on upgrading the package, I use
    echo "$PACKAGE hold" | dpkg --set-selections
to tell dist-upgrade not to upgrade that package for the time being.

However, on occasion I have found that a problematic bug comes not from
apt's desire to upgrade an installed package, but from its desire to
install a specific new package. As such, I would like to be able to tell it
to "hold" the installed version of that single package at "none", until
further notice - thereby excluding it and anything which depends on it from
the dist-upgrade calculations.

The new package is most probably pulled in by a new version of some other
package. Hold that instead ;)

That would indeed be the obvious solution, and it's what I normally do in such
cases as well. However, there have also been cases where that was not a suitable
approach. Unfortunately, this has only happened twice, and I'm not being able to
remember enough specifics to explain why.

Sorry for the insufficiently well-founded question. If I ever dig up the
foundation again, I'll try again.

aptitude's interactive mode and 'forbid-version' is very useful in connection
with apt-listbugs ;)

I'll look into that, but I'm unlikely to use it, if only because I don't like
aptitude; its interface is worse than that of apt-get in my opinion, and
although you *can* in theory get its dependency resolver to produce solutions as
good as or better than the one from apt-get, in practice doing so often seems to
require saying "no" to dozens if not hundreds of idiotically incorrect suggested
solutions (including many which explicitly contradict the situation requested on
the command line).

Add in that I've seen it indicated that mixing use of apt-get with use of
aptitude is a bad idea, and it's just easier for me to avoid aptitude entirely.

--
      The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Every time you let somebody set a limit they start moving it.
  - LiveJournal user antonia_tiger


Reply to: