1

So this is my apt policy:

apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 400 http://deb.debian.org/debian bullseye/main amd64 Packages
     release o=Debian,a=testing,n=bullseye,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian buster-updates/main amd64 Packages
     release o=Debian,a=stable-updates,n=buster-updates,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
     release v=10,o=Debian,a=stable,n=buster,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 500 http://deb.debian.org/debian buster/main amd64 Packages
     release v=10.6,o=Debian,a=stable,n=buster,l=Debian,c=main,b=amd64
     origin deb.debian.org
 450 http://ftp.debian.org/debian buster-backports/main amd64 Packages
     release o=Debian Backports,a=buster-backports,n=buster-backports,l=Debian Backports,c=main,b=amd64
     origin ftp.debian.org
Pinned packages:

Taking remmina as an example package which I installed from testing apt policy shows:

apt policy
remmina:
  Installed: 1.4.8+dfsg-2~bpo10+1
  Candidate: 1.4.8+dfsg-2~bpo10+2
  Version table:
    1.4.8+dfsg-2 400
      400 http://deb.debian.org/debian bullseye/main amd64 Packages
    1.4.8+dfsg-2~bpo10+2 450
      450 http://ftp.debian.org/debian buster-backports/main amd64 Packages
*** 1.4.8+dfsg-2~bpo10+1 100
      100 /var/lib/dpkg/status
    1.3.3+dfsg-2 500
      500 http://deb.debian.org/debian buster/main amd64 Packages

apt upgrade (actually apt full-upgrade, since there is some conflict) proposes to upgrade remmina.

As documented here (in German, section "Automatische Aktualisierungen", since the same section does not exist in the english version), choosing a pinning value of 200 (or like me 400) is the recommended way to get updates for backport packages, however, this contradicts (IMO) with the apt documentation:

100 < P <=500 causes a version to be installed unless there is a version available belonging to some other distribution or the installed version is more recent.

So, as far as I understand, remmina should not be upgraded since it is available in some other (stable, which is even the target release) distribution. Additionally, (it is not documented that way) but I would understand if the backports version is preferred because it is way newer, but then this would apply to most packages installed on my system. However, only the remmina package is proposed to be upgraded. Where am I wrong?

1 Answer 1

1

The first rule of package upgrades is

Never downgrade unless the priority of an available version exceeds 1000.

So, when considering

remmina:
  Installed: 1.4.8+dfsg-2~bpo10+1
  Candidate: 1.4.8+dfsg-2~bpo10+2
  Version table:
    1.4.8+dfsg-2 400
      400 http://deb.debian.org/debian bullseye/main amd64 Packages
    1.4.8+dfsg-2~bpo10+2 450
      450 http://ftp.debian.org/debian buster-backports/main amd64 Packages
*** 1.4.8+dfsg-2~bpo10+1 100
      100 /var/lib/dpkg/status
    1.3.3+dfsg-2 500
      500 http://deb.debian.org/debian buster/main amd64 Packages

the 500-priority entry is ignored, and the backports version becomes the candidate.

This is the intended behaviour for backports, and is the reason why they have a priority of 100 by default (instead of 500): they are never a default source of packages for installation, but once a package is installed from backports, any upgrades in backports should be automatic candidates.

2
  • Actually, I did not expect a downgrade, instead I expected apt to do nothing. However, everything makes sense, considering that the first rule "never downgrade" implies that the pinning values of those package versions are ignored. I thought the "downgrade is ignored" if you understand what I mean.
    – jd-dot
    Nov 16, 2020 at 11:56
  • Yes, I didn’t think you expected a downgrade, I just meant that the rule causes the stable entry to not be considered. Nov 16, 2020 at 12:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .