apt-get install removes package hold status

Bug #1655084 reported by Steve Buehrle
6
This bug affects 1 person
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-unauthenticated myscripts=1.0
...

# 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_1.1-1.deb ...
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/dpkg/status

Revision history for this message
Julian Andres Klode (juliank) wrote :

"The following packages will be unheld" should do it.

Changed in apt (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.