apt 升级和本地重建的软件包

apt 升级和本地重建的软件包

我重建了本地qemu包,并在构建之前应用了一些补丁。结果,我得到了大约十几个使用以下方法安装的包:

$ sudo dpkg -i $(ls -1 *.deb | grep -v ^qemu-user-static)
$ sudo apt-get install --fix-broken -y
...
Setting up qemu-system-x86 (1:2.5+dfsg-5ubuntu10.42) ...
Setting up qemu-user (1:2.5+dfsg-5ubuntu10.42) ...
...

有趣的是,如果我在此之后运行apt-get upgrade,一些软件包将被建议从存储库升级(本地和存储库软件包版本匹配),但其他软件包则不匹配):

$ sudo apt-get dist-upgrade 
...
The following packages will be upgraded:
  qemu-system-arm qemu-system-mips qemu-system-misc qemu-system-ppc qemu-system-sparc qemu-system-x86 qemu-utils
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
...
$ apt-cache policy qemu-system-x86
qemu-system-x86:
  Installed: 1:2.5+dfsg-5ubuntu10.42
  Candidate: 1:2.5+dfsg-5ubuntu10.42
  Version table:
     1:2.5+dfsg-5ubuntu10.42 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
 *** 1:2.5+dfsg-5ubuntu10.42 100
        100 /var/lib/dpkg/status
...
$ apt-cache policy qemu-user
qemu-user:
  Installed: 1:2.5+dfsg-5ubuntu10.42
  Candidate: 1:2.5+dfsg-5ubuntu10.42
  Version table:
 *** 1:2.5+dfsg-5ubuntu10.42 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
        100 /var/lib/dpkg/status
...

因此,不清楚 dpkg/apt 如何决定覆盖哪些本地软件包以及不覆盖哪些本地软件包。有什么标准可以自行检查吗?

相关内容