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

Is to possible to "pin" based on package origin AND package versioning with a single "Pin:" line (to stay within winehq stable)?



Hello.

I recently run into some troubles with the WineHQ 10.x packages (of
their development release channel) that is available to bookworm
concurrently with their stable (9.x) packages (my troubles are off-topic
here but I they will be reported where appropriate).

So after downgrading those package to their 9.x versions, I looked into
how to prevent those from be re-introduced to my system. Thus, I was
hinted to introduce a "pin".

But is it even POSSIBLE to pin against BOTH package origin AND package
version, with a single 'Pin:' line?

I've started with this:
$ cat /etc/apt/preferences.d/winehq-v9
Package: *:any
Pin: release o="dl.winehq.org", v=9*
Pin-Priority: 625

I thought this would pin ALL such packages from that "origin" with the
priority '625' (625, as a non-truncated increment leading from 500 to
1000 (500, 625, 750, 875, 1000)).

This wouldn't work for some reason.

However using only this line:
Pin: release o="dl.winehq.org"
would mark all the packages from that origin with that priority
(I've tried other ways but I feel the culprit
must be something else than the 'Pin:' line syntax)

I've followed the instruction mentioned here:

https://gitlab.winehq.org/wine/wine/-/wikis/Debian-Ubuntu

and more specifically my winehq sources file is this:

https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources

Here's an excerpt of a desired output of apt-cache policy winehq-stable:

...
  Version table:
     10.0.0.0~bookworm-1 500
        500 https://dl.winehq.org/wine-builds/debian bookworm/main
amd64 Packages
 *** 9.0.0.0~bookworm-1 625
        500 https://dl.winehq.org/wine-builds/debian bookworm/main
amd64 Packages
        100 /var/lib/dpkg/status
...

But this failed to happen while trying to have BOTH criteria in the same line.

Splitting the criteria WORKED, namely:

$ cat /etc/apt/preferences.d/winehq-v9
Package: *:any
Pin: origin "dl.winehq.org"
Pin: version 9*
Pin-Priority: 625

Why it would NOT work with this line instead?

> Pin: origin "dl.winehq.org", version 9*

Is there a way it WOULD work with a single 'Pin:' line?
What would that line be?

Which part of:
man 5 apt_preferences
I missed?

Thanks in advance,
Sophoklis


Reply to: