cra*_*gds 6 package-management apt dpkg
我们最近从 10.04 升级到 14.04。
我们有一些保留的软件包,我们会不时对其进行升级。似乎在 14.04 上,当您安装或升级软件包时,它会删除对该软件包的保留。
$ dpkg --get-selections libmysqlclient18
libmysqlclient18:amd64 install
# Hold the package
$ echo 'libmysqlclient18:amd64 hold' | sudo dpkg --set-selections
# Check that worked
$ dpkg --get-selections libmysqlclient18
libmysqlclient18:amd64 hold
# Install a new version of the package
$ sudo apt-get install libmysqlclient18
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mysql-common
The following held packages will be changed:
libmysqlclient18
The following packages will be upgraded:
libmysqlclient18 mysql-common
2 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
Need to get 610 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-common all 5.5.44-0ubuntu0.14.04.1 [13.9 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libmysqlclient18 amd64 5.5.44-0ubuntu0.14.04.1 [596 kB]
Fetched 610 kB in 1s (339 kB/s)
Reading changelogs... Done
apt-listchanges: Mailing root: apt-listchanges: changelogs for <host>
(Reading database ... 490677 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.5.44-0ubuntu0.14.04.1_all.deb ...
Unpacking mysql-common (5.5.44-0ubuntu0.14.04.1) over (5.5.43-0ubuntu0.14.04.1) ...
Preparing to unpack .../libmysqlclient18_5.5.44-0ubuntu0.14.04.1_amd64.deb ...
Unpacking libmysqlclient18:amd64 (5.5.44-0ubuntu0.14.04.1) over (5.5.43-0ubuntu0.14.04.1) ...
Setting up mysql-common (5.5.44-0ubuntu0.14.04.1) ...
Setting up libmysqlclient18:amd64 (5.5.44-0ubuntu0.14.04.1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Run Code Online (Sandbox Code Playgroud)
安装删除了保留!
$ dpkg --get-selections libmysqlclient18
libmysqlclient18:amd64 install
Run Code Online (Sandbox Code Playgroud)
这发生在没有 postinst/prerm 脚本的包上,所以问题似乎出在 apt 而不是包本身。它没有发生在 10.04 中。
任何人都可以提出一种解决方法来阻止 apt 这样做吗?
这是 dpkg 的更改,而不是 apt 的更改:
# dpkg --get-selections | grep hold
google-chrome-stable hold
# dpkg -i google-chrome-stable_44.0.2403.125-1_amd64.deb
(Reading database ... 318187 files and directories currently installed.)
...
# dpkg --get-selections | grep hold
#
Run Code Online (Sandbox Code Playgroud)
做了一些 git bisect 后,此更改作为https://bugs.debian.org/cgi-的一部分在https://anonscm.debian.org/cgit/dpkg/dpkg.git/commit/?id=fb8997a460a0ef2909199b4603604a4e855003e0中引入bin/bugreport.cgi?bug=162541
| 归档时间: |
|
| 查看次数: |
1619 次 |
| 最近记录: |