Bug#985749: apt: "apt-mark hold" flag lost on package upgrade using --ignore-hold
Control: reassign -1 dpkg
On Mon, Mar 22, 2021 at 10:21:59PM +0100, Sven-Haegar Koch wrote:
> Package: apt
> Version: 2.2.2
> Severity: minor
>
> Dear Maintainer,
>
> 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.
No, you want to pin them using apt_preferences(5).
>
> 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.
>
> The flag is documented in "man apt-get" as
>
> --ignore-hold
> Ignore package holds; this causes apt-get to ignore a hold placed
> on a package. This may be useful in conjunction with dist-upgrade
> to override a large number of undesired holds. Configuration Item:
> APT::Ignore-Hold.
>
> So I expect the flag on the package to be ignored for this apt-get
> execution, not changed or removed.
That's the correct behavior - a package has one selection state; and
when you tell it to install something that was hold, that state changes
from hold to install.
Anyway, I think this is a dpkg topic, not an apt one, though I might be
wrong, since we do some temporary state changes, but not sure about the
extend; I think this is really dpkg's decision, though.
The flag ought to be called --unset-hold, but oh well.
--
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer i speak de, en
Reply to: