Default priorities assigned to distributions and binary packages
Each
source in the
/etc/apt/sources.list
contains a
distribution
.
We can set for a
distribution its components , and architectures …
A
distribution
will receive a default priority based on its
Release
file .
- priority 1
-
If a distribution Release file contains
NotAutomatic: yesandButAutomaticUpgrades: noor if it contains onlyNotAutomatic: yes. For example the experimental distribution will receive a priority of 1.Origin: Debian Label: Debian Suite: experimental Codename: experimental ... NotAutomatic: yes ...
- priority 100
-
If a distribution Release file contains
NotAutomatic: yesandButAutomaticUpgrades: yes. For example the buster-backport distribution suite extension will receive a priority of 100.Origin: Debian Backports Label: Debian Backports Suite: buster-backports Codename: buster-backports ... NotAutomatic: yes ButAutomaticUpgrades: yes ...
- priority 500
-
For all other distributions, for example the stable , testing and unstable distributions .
Origin: Debian Label: Debian Suite: stable Version: 10.2 Codename: buster ...
Installed packages will receive a priority of 100 irrelative to the distribution that they came from .
Uninstalled packages will
receive a priority of
1
if they come from a distribution
that has in its
Release
file
NotAutomatic: yes
and
ButAutomaticUpgrades: no
or if the
Release
file
contains only
NotAutomatic: yes .
They will receive a priority of
100
if they come from a distribution that
has in its release file
NotAutomatic: yes
and
ButAutomaticUpgrades: yes
, and they will receive a priority of
500
for all other cases.
For
example this
/etc/apt/sources.list
file , specify:
- The main component for the unstable and testing distributions.
- The main and the non-free components for the stable distribution .
- The main component for the stable-backports and stable-updates distribution extensions.
- The amd64 and i386 architecture for the main component of the experimental distribution.
# stable distribution deb http://deb.debian.org/debian/ stable main non-free # stable distribution security updates deb http://security.debian.org/debian-security stable/updates main non-free # stable-updates distribution extension deb http://deb.debian.org/debian/ stable-updates main # testing distribution deb http://deb.debian.org/debian/ testing main # unstable distribution deb http://deb.debian.org/debian/ unstable main # exprimental distribution deb [ arch=amd64,i386 ] http://deb.debian.org/debian/ experimental main # stable-backports distribution deb http://deb.debian.org/debian/ stable-backports main
We can use the
apt-cache policy
command in order to view the default priorities assigned
to
each one of these distributions .
@debian:~$ apt-cache policy
# get the priorities of distributions and of packages.
Package files:
100 /var/lib/dpkg/status
release a=now
# /var/lib/dpkg/status contains packages status.
# For example a package can have a status of :
# deinstall ok config-files
# The package is selected for deinstallation ,
# it is in a know state ,
# only the configuration file are kept on the system .
# Or for example , It can have a status of :
# install ok installed
# The package is selected for installation ,
# it is in a known state,
# and it has been unpacked and configured.
# The package that are installed on the system
# have a priority of 100 .
100 http://deb.debian.org/debian stable-backports/main amd64 Packages
release o=Debian Backports,a=buster-backports,n=buster-backports,l=Debian Backports,c=main,b=amd64
origin deb.debian.org
# The stable-backports distribution extension
# has a priority of 100 because its Release file contains
# NotAutomatic: yes and ButAutomaticUpgrades: yes .
# The default architecture for stable-backports was not set
# in /etc/apt/sources.list :
# deb http://deb.debian.org/debian/ stable-backports main
# as such the the default architecture that is
# selected is the architecture that apt
# was compiled for , in this case it is amd64.
# We also selected the main component , hence
# the selected packages are the
# amd64 binary packages from the main
# component .
# The default priority of
# 100 will be applied to them , since they
# belong to the stable-backports distribution .
1 http://deb.debian.org/debian experimental/main i386 Packages
release o=Debian,a=experimental,n=experimental,l=Debian,c=main,b=i386
origin deb.debian.org
1 http://deb.debian.org/debian experimental/main amd64 Packages
release o=Debian,a=experimental,n=experimental,l=Debian,c=main,b=amd64
origin deb.debian.org
# The experimental distribution main component i386 and amd64
# architectures have a priority of 1 ,
# because its Release file contains
# only NotAutomatic: yes .
500 http://deb.debian.org/debian unstable/main amd64 Packages
release o=Debian,a=unstable,n=sid,l=Debian,c=main,b=amd64
origin deb.debian.org
# The unstable distribution main component amd64 architecture has a
# priority of 500 , because its Release file does not
# contain NotAutomatic: yes .
500 http://deb.debian.org/debian testing/main amd64 Packages
release o=Debian,a=testing,n=bullseye,l=Debian,c=main,b=amd64
origin deb.debian.org
# The testing distribution main component amd64 architecture has a
# priority of 500 , because its Release file does not
# contain NotAutomatic: yes .
500 http://deb.debian.org/debian stable-updates/main amd64 Packages
release o=Debian,a=stable-updates,n=buster-updates,l=Debian,c=main,b=amd64
origin deb.debian.org
# The stable-updates distribution extension main component
# amd64 architecture has a
# priority of 500 , because its Release file does not
# contain NotAutomatic: yes .
500 http://security.debian.org/debian-security stable/updates/non-free amd64 Packages
release v=10,o=Debian,a=stable,n=buster,l=Debian-Security,c=non-free,b=amd64
origin security.debian.org
500 http://security.debian.org/debian-security stable/updates/main amd64 Packages
release v=10,o=Debian,a=stable,n=buster,l=Debian-Security,c=main,b=amd64
origin security.debian.org
# The stable distribution main and non-free
# components , amd64 architecture from the
# http://security.debian.org/debian-security
# URI have a priority of 500 , because its Release
# file does not contain NotAutomatic: yes .
500 http://deb.debian.org/debian stable/non-free amd64 Packages
release v=10.2,o=Debian,a=stable,n=buster,l=Debian,c=non-free,b=amd64
origin deb.debian.org
500 http://deb.debian.org/debian stable/main amd64 Packages
release v=10.2,o=Debian,a=stable,n=buster,l=Debian,c=main,b=amd64
origin deb.debian.org
# The stable distribution main and non-free
# components , amd64 architecture , from the
# http://deb.debian.org/debian
# URI have a priority of 500 , because its
# Release file does not contain NotAutomatic: yes .
Pinned packages: