Running 'aptitude update' clears hold flags on packages

Bug #1817350 reported by Mike Nguyen on 2019-02-22
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
aptitude (Ubuntu)
Undecided
Unassigned

Bug Description

When running an 'aptitude update' for the very first time, it seems to clear up any hold flags that were previous put in place via 'apt-mark hold <package>'.

1:
root@cb-qa-lb-1:~# lsb_release -rd
Description: Ubuntu 18.04.2 LTS
Release: 18.04

2:
root@cb-qa-lb-1:~# apt-cache policy aptitude
aptitude:
  Installed: 0.8.10-6ubuntu1
  Candidate: 0.8.10-6ubuntu1
  Version table:
 *** 0.8.10-6ubuntu1 500
        500 http://ca.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

3:
When a 'hold' flag is set on a package, it should be kept. Doing an 'aptitude update' should not be clearing these package flags. This is not the case as the hold flag is getting removed.

4:
All 'hold' flags on packages that were previously set get cleared.

Upon running 'aptitude update', it seems to create /var/lib/aptitude/pkgstates, and also update /var/lib/dpkg/status, which seems to remove any flags on packages that were present.

Pastebin here with some output: https://paste.ubuntu.com/p/VF6kQRbSmf/

This only seems to happen when running 'aptitude update' on an initial run. Doing an 'apt update' does not cause any issue.

Note that running subsequent 'aptitude update' with /var/lib/aptitude/pkgstates already existing does not seem to cause any issue anymore and any hold flags that get set are kept.

Mike Nguyen (moozoo) wrote :

I should note that I've also tested this on 16.04.6 and am getting the same unexpected behaviour.

root@ansible:/var/lib/aptitude# lsb_release -rd
Description: Ubuntu 16.04.6 LTS
Release: 16.04

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers