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

Re: Apt pinning.



On Sat, 27 Nov 2021, Dan Ritter wrote:

Tim Woodall wrote:
Can anyone tell me exactly what this Pin line I have actually does - or
even better point me to a webpage that has more than "if you want to do
this use this" type of example?

(FTAOD I know that this isn't right and is inconsistent but before I
start changing it I want to really understand what it's currently doing)

I have a local repository:

Codename: buster
Components: main
Date: Thu, 25 Nov 2021 19:42:12 +0000
Description: Debs for local installing
Label: local debs
Origin: local debs
Suite: oldstable

And I have a pin (which I've failed to update since bullseye became
stable hence the a=stable)

Package: *
Pin: release o=local debs,a=stable,n=buster,l=local debs,c=main,b=amd64
Pin-Priority: 900

man apt_preferences  # go ahead and read it, it's well-organized


Many thanks. I think I've been lucky and stumbled into something that
worked for me but isn't very robust.

I've never set a default release, I've never added (except for sources)
sources.list entries other than for things I've wanted installed. So the
900 worked.

Need to think about whether I want to change that - I cannot immediately
see how it improves things for me but it might make sense to change if
that's what everybody else does. It will undoubtedly cause me
head-scratching when I upgrade to Trixy and it doesn't work...


I'm trying to solve a (minor) problem I'm having during upgrades from
buster to bullseye where I've backported make from bullseye to buster.
So on my buster systems I have:
make/oldstable,now 4.3-4.1+tjw10r1 amd64 [installed]

while once I've upgraded to bullseye I want to "downgrade" from my
backported package to make 4.3-4.1 and then continue to track bullseye.

You will need a priority over 1000.

I don't recommend this, but you get to keep all the pieces.


Yes, I don't think I can do this with a generic pin. Maybe pinning
origin "" to -100 might work - not sure if that will uninstall or
downgrade (I'll experiment). I think adding explicit pins to my
'bullseye-local-sources' package for these packages I want to downgrade
might be my only option. For the two packages I have that I want to
downgrade during the update to bullseye it's easy enough to manually fix
and I haven't yet had to backport anything to bullseye that won't keep a
patched version during the upgrade to Trixy.

Thanks for the pointers.

Tim.


Reply to: