[pacman-dev] IgnorePkg for specific package versions

Allan McRae allan at archlinux.org
Sun Jan 11 09:58:58 UTC 2015

On 06/01/15 08:41, Daniel Schoepe wrote:
> Hi everyone,
> I think that it would be nice to be able to specify particular version
> constraints for packages to be ignored in IgnorePkg / --ignore, like it
> was suggested on the forums [1]. This would be helpful for preventing
> particular buggy versions from being installed but trying each update
> after that.
> Regarding the comment that partial upgrades are not supported: This is
> "invariant" is already being broken by having IgnorePkg in the first
> place, so I don't think this proposal makes it worse.

They are not supported by Arch Linux - pacman caters to a wider number
of distributions.

> It turns out that this is *almost* very easy to implement by converting
> each element of handle->ignorepkg to an alpm_depend_t and then comparing
> with _alpm_dec_literal(). However, this does not quite work since some
> ignore-checks also check if the local package matches the ignore rule,
> which leads to arguably counter-intuitive results when used with lower
> bounds:
> If package-0.1-1 is installed and package-0.2-1 has a bug, a user might
> write package<=0.2-1 in IgnorePkg, but this leads to the package never
> being upgrade anymore since the local version (0.1-1) matches this
> condition.

I'd restrict IgnorePkg to only specifying version with "=".  <= does not
make sense to me.

> So I have a couple of questions: Do you think this is a sensible feature
> to have in the first place? If so, how should the potential problem
> above be handled? These are the most reasonable options that I could
> come up with:
> 1. Don't compare with the local version anymore: This has the downside
> of altering the semantics of IgnorePkg even if the user does not change
> their config.
> 2. Implement the less intuitive semantics that would result from 
> my suggested change. This is not so nice since a common use case might
> be to wait until a particular version that fixes some bug is
> released. A new package release of the same version would usually not
> help then.

There are four possibilities with a package update:

pkgrel update, bug fixed
pkgrel update, bug not fixed
pkgver update, bug fixed
pkgrel update, bug not fixed

You can probably rule out the last if you know the bug has been fixed
upstream.  I am not sure there is an advantage allowing >= over = in the
remaining situations.

> 3. Restrict the syntax to only allow equality comparisons in
> IgnorePkg. This prevents the use case from 2 as well.

This is my preferred approach.

> 4. Do not compare with the old version if and only if a version
> constraint is given on for this package. This has the advantage of not
> affecting anybody using IgnorePkg at the moment and anyone using version
> constraints can be made aware of this behaviour. However, this is
> somewhat ad-hoc and asymmetric.
> Any comments and input is appreciated.
> Cheers,
> Daniel
> [1] https://bbs.archlinux.org/viewtopic.php?id=182893

More information about the pacman-dev mailing list