On Mon, Mar 22, 2021 at 10:21:59PM +0100, Sven-Haegar Koch wrote:
> On some of my hosts I have a single or a very small number of packages
> that I am only allowed to upgrade with specific procedures, pre-arranged
> maintenance window and so on.
> 
> But for the rest of the packages I want to install Debian (security)
> updates as soon as possible.
> 
> "apt-mark hold" sounds exactly like what I want.

I would think you are better of with apt_preferences as that is intended
to control which packages are allowed to be upgraded (from where). As
that is more powerful in some sense it is also not that easy to handle
though: There is no simple flag e.g. – but using specific files for each
you can disable as needed might be workable.

(It might be an interesting idea to allow preferences to be tagged and
 to then to be ignored based on tag selection from the commandline…
 that currently doesn't exist at all though and is just a silly random
 idea popping into my head as I wrote this mail)


> I hold the package, and with normal upgrade/dist-upgrade it works
> exactly as expected.
> 
> But when I then upgrade these single package later using --ignore-hold,
> the hold flag is lost afterwards.

holds are stored by dpkg as a "selection state", which e.g. install or
deinstall are, too, and which will override the old selection state sort
of by design.

It is also this way since the dawn of time, so that is kinda unlikely to
change – resolving this bug might be as "simple" as adding a note that
holds will be (potentially) lost if they are ignored.

Sorry, as that is probably not what you wanted to hear.


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature

Reply via email to