Hi Raphaël,

Thanks for reporting.

On 29-12-2021 11:44, Raphaël Hertzog wrote:
Usage of --pin-packages=kali-dev=src:foo results in a file like this
in /etc/apt/preferences.d/autopkgtest-kali-dev

Package:  foo
Pin: release a=kali-dev
Pin-Priority: 995

Unfortunately the "a=kali-dev" only matches on the "Suite" or "Archive"
field in the Release file, and not on the "Codename" field (which in my
caces was the only field available).

I noticed that /etc/apt/preferences.d/autopkgtest-default-release uses
another syntax that seems to cover more cases:

Package: *
Pin: release kali-rolling
Pin-Priority: 990

However that syntax doesn't seem to be documented in apt_preferences.
If it's correct and allows to check on either of the 3 fields, then
we should likely use the same syntax in both files.

Otherwise I would like to suggest to create two entries, one with
"Pin: release a=foo" and one with "Pin: release n=foo" so that
we are sure to match on any of the 3 fields.

I'll have to check and think about this. I remember that I had lots of issues with coming up with changes to autopkgtest that also worked for Ubuntu, as they use the same Codename for the real Suite and the *-proposed Suite (which they call pocket). I don't recall if that was with respect to pinning or other aspects of autopkgtest and it's requirement to manipulate where packages should be installed from. Before committing your proposal I need to understand that I'm not breaking existing valid configurations too.

Paul

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to