apt-get install removes package hold status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Expected behavior: When I place a package on hold, I expect that updating a package to a specific version will keep the hold status.
Observed behavior: Updating a package to a specific version removed the hold status.
Test case:
Create a simple repo directory with 3 versions of a test package. The versions are 1.0, 1.1, and 1.2.
# aptitude versions myscripts
Package MYSCRIPTS:
p 1.0 <NULL> 500
p 1.1 <NULL> 500
p 1.2 <NULL> 500
Install version 1.0, and place package on hold
## apt-get install -q -y --allow-
...
# apt-mark hold myscripts
MYSCRIPTS set on hold.
# dpkg --get-selections myscripts
myscripts hold
Update package version 1.0 to 1.1
# apt-get install myscripts=1.1 Reading package lists... Done
Building dependency tree
Reading state information... Done
The following held packages will be changed:
MYSCRIPTS
The following packages will be upgraded:
MYSCRIPTS
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/724 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
MYSCRIPTS
Install these packages without verification? [y/N] y
(Reading database ... 126044 files and directories currently installed.)
Preparing to unpack ..././MYSCRIPTS
Unpacking myscripts (1.1) over (1.0) ...
Setting up myscripts (1.1) ...
There is nothing in the output about the hold status, and I expect the hold status to remain on hold.
# dpkg --get-selections myscripts
myscripts install
Additional info:
# lsb_release -rd
Description: Ubuntu 14.04.5 LTS
Release: 14.04
# apt-cache policy apt
apt:
Installed: 1.0.1ubuntu2.17
Candidate: 1.0.1ubuntu2.17
Version table:
*** 1.0.1ubuntu2.17 0
100 /var/lib/
"The following packages will be unheld" should do it.