The officially official Devuan Forum!

You are not logged in.

#1 2022-08-31 15:51:44

delgado
Member
Registered: 2022-07-14
Posts: 152  

[SOLVED] apt pinning 1001 / automatic package version downgrade

Hi,

About ~18 month ago it was still possible to downgrade package versions by setting the releases pin priority to 1001. Applied with apt update - nice and easy.
Now, apt happly tells you, that the newest version of the package is installed. Have a cookie!

Is it possible to restore the previous behavoir?

Supplemental (not really part of the question, just how it happened)

The pin priority in /etc/apt/preferences is not applied directly. Checking with apt-cache policy, resulted in a values of "990 : 500 : 100" instead of "1001 : -1 : -10". Remarkable may be: Pin priority 1001 for 'force downgrade' is gone.

What's the purpose?
Distro downgrade (to try lcarsde). Sounds complicated, but it wasn't. The process was straight forward. At the time I moved a box from testing (bullseye) back to stable (buster):
Adjust /etc/apt/sources.list, pin the release to 1001 in /etc/apt/preferences, apt update; apt upgrade; apt dist-upgrade; reboot with the "new" 4.19 kernel.
That really impressed me!  (later the box became bullseye again and is now chimaera)

Yesterday I tried the same with chimaere to beowulf and bullseye to buster. Countless variants of pinning and sources.list - nope.

Offline

#2 2022-08-31 16:02:10

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] apt pinning 1001 / automatic package version downgrade

The sid version of the man page still says the same:

apt_preferences(5) wrote:

P >= 1000
causes a version to be installed even if this constitutes a downgrade of the package

https://manpages.debian.org/unstable/ap … Priorities

So can we see the full output of

cat /etc/apt/preferences{,.d/*}
apt policy

Thanks!


Brianna Ghey — Rest In Power

Offline

#3 2022-08-31 20:40:05

delgado
Member
Registered: 2022-07-14
Posts: 152  

Re: [SOLVED] apt pinning 1001 / automatic package version downgrade

This is from debian bullseye, backdate target is buster. The chimaera image showed a comparable behaviour.
Thanks for looking!

$ cat /etc/apt/preferences{,.d/*}
Package: *
Pin: release a=buster
Pin-Priority: 1001
cat: '/etc/apt/preferences.d/*': No such file or directory

$ apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://ftp.de.debian.org/debian buster/contrib amd64 Packages
     release v=10.12,o=Debian,a=oldstable,n=buster,l=Debian,c=contrib,b=amd64
     origin ftp.de.debian.org
 500 http://ftp.de.debian.org/debian buster/non-free amd64 Packages
     release v=10.12,o=Debian,a=oldstable,n=buster,l=Debian,c=non-free,b=amd64
     origin ftp.de.debian.org
 500 http://ftp.de.debian.org/debian buster/main amd64 Packages
     release v=10.12,o=Debian,a=oldstable,n=buster,l=Debian,c=main,b=amd64
     origin ftp.de.debian.org
Pinned packages:

# some details and commands:
$ cat /etc/debian_version
11.4
$ cat sources.list
deb http://ftp.de.debian.org/debian/ buster main non-free contrib

$ apt update
Hit:1 http://ftp.de.debian.org/debian buster InRelease
All packages are up to date.

$ apt upgrade
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ apt list -a | grep linux-image-amd64/
linux-image-amd64/now 5.10.136-1 amd64 [installed,local]
linux-image-amd64/oldstable 4.19+105+deb10u15 amd64

$ apt install linux-image-amd64
linux-image-amd64 is already the newest version (5.10.136-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

# downgrade single package:
$ apt -s install linux-image-amd64=4.19+105+deb10u15
0 upgraded, 1 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Inst linux-image-4.19.0-20-amd64 (4.19.235-1 Debian:10.12/oldstable [amd64])
Inst linux-image-amd64 [5.10.136-1] (4.19+105+deb10u15 Debian:10.12/oldstable [amd64])

Offline

#4 2022-08-31 20:51:20

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] apt pinning 1001 / automatic package version downgrade

delgado wrote:
Package: *
Pin: release a=buster
Pin-Priority: 1001

I think that should be n=buster. See the apt policy output for the correct identifiers wink

Last edited by Head_on_a_Stick (2022-08-31 20:51:49)


Brianna Ghey — Rest In Power

Offline

#5 2022-08-31 22:22:32

delgado
Member
Registered: 2022-07-14
Posts: 152  

Re: [SOLVED] apt pinning 1001 / automatic package version downgrade

That's  better- thanks a lot!

Good to know, that apt is still working as expected.
Quite sure I have had some trys using a=oldstable, but there must be another error incorporated.

$ apt policy 
Package files:
 100 /var/lib/dpkg/status
     release a=now
1001 http://ftp.de.debian.org/debian buster/contrib amd64 Packages
     release v=10.12,o=Debian,a=oldstable,n=buster,l=Debian,c=contrib,b=amd64
     origin ftp.de.debian.org
1001 http://ftp.de.debian.org/debian buster/non-free amd64 Packages
     release v=10.12,o=Debian,a=oldstable,n=buster,l=Debian,c=non-free,b=amd64
     origin ftp.de.debian.org
1001 http://ftp.de.debian.org/debian buster/main amd64 Packages
     release v=10.12,o=Debian,a=oldstable,n=buster,l=Debian,c=main,b=amd64
     origin ftp.de.debian.org
Pinned packages:

Offline

#6 2022-09-04 14:42:26

delgado
Member
Registered: 2022-07-14
Posts: 152  

Re: [SOLVED] apt pinning 1001 / automatic package version downgrade

This Issue came out other than I initially thought.

Dear admin,
suggestion is to move the whole thread from "Freedom Hacks" to "Installation" or "Other Issues". On occation.
Thanks.

Offline

Board footer