我运行apt-get upgrade
,它说没有什么可以升级到:
# apt-get update && apt-get upgrade && apt-get dist-upgrade
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:4 http://ftp.debian.org/debian buster-backports InRelease
Get:5 http://nginx.org/packages/debian buster InRelease [3,589 B]
Hit:7 http://deb.debian.org/debian buster-updates InRelease
Hit:8 http://deb.debian.org/debian-security buster/updates InRelease
Hit:10 https://www.deb-multimedia.org buster InRelease
Hit:9 http://cdn-fastly.deb.debian.org/debian buster InRelease
Fetched 9,177 B in 2s (5,558 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
但是,我通过以下方式安装了内核buster-backports
:
# apt-get install -t buster-backports linux-image-amd64
当前版本是5.9.0-0.bpo.2-amd64
:
# uname -a
Linux erik3 5.9.0-0.bpo.2-amd64 #1 SMP Debian 5.9.6-1~bpo10+1 (2020-11-19) x86_64 GNU/Linux
...它有一个更新:
root@erik3:~# apt-cache policy linux-image-amd64
linux-image-amd64:
Installed: 4.19+105+deb10u8
Candidate: 4.19+105+deb10u8
Version table:
5.9.15-1~bpo10+1 100
100 http://ftp.debian.org/debian buster-backports/main amd64 Packages
*** 4.19+105+deb10u8 500
500 http://deb.debian.org/debian buster/main amd64 Packages
500 http://http.debian.net/debian buster/main amd64 Packages
100 /var/lib/dpkg/status
4.19+105+deb10u7 500
500 http://deb.debian.org/debian-security buster/updates/main amd64 Packages
但是,apt-get upgrade && apt-get dist-upgrade
忽略包实际所属位置的任何更新。
问题
如果我从向后移植安装了这些软件包,如何知道apt-get upgrade && apt-get dist-upgrade
从向后移植升级这些软件包?
答案1
但是,我从 中安装了内核
buster-backports
,因此它有一个更新:
不完全是。您将向后移植存储库添加到源中,但没有安装该软件包。
来自反向移植的软件包不会自动安装(apt 设置NotAutomatic: yes
),而是在安装后进行升级(ButAutomaticUpgrades: yes
,优先级 100)。
版本4.19+105+deb10u8
已安装(也是安装候选版本),5.9.15-1~bpo10+1
优先级较低,为 100,需要手动安装
apt -t buster-backports install linux-image-amd64
然后,升级将自动从向后移植安装更新版本的软件包(除非有其他源具有更高的优先级和更新的版本)。