apt-mark overwrites existing held package info

Bug #1694989 reported by Matthew North on 2017-06-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Debian)
New
Unknown
apt (Ubuntu)
Low
Unassigned

Bug Description

Running apt-mark hold commands overwrites / nullifies any existing held package data. Not sure if this is by design, but I assume it's meant to be cumulative.

Ubuntu version: 16.04.2 LTS
Package version: apt 1.2.19 amd64

Expected behaviour:

apt-mark hold 3dchess
apt-mark hold 0ad
apt-mark showhold

3dchess
0ad

Actual behaviour:

apt-mark hold 3dchess
apt-mark hold 0ad
apt-mark showhold

0ad

Julian Andres Klode (juliank) wrote :

Yup, something odd is going on there.

Changed in apt (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Brian Murray (brian-murray) wrote :

Confirmed on artful with apt version 1.4.6.

tags: added: xenial
tags: added: artful
David Kalnischkies (donkult) wrote :

Is it really /any/ which I can't confirm at the moment as holding e.g. apt & dpkg works just fine…

The underlying question is: Are the packages you are trying to hold installed? If not, dpkg will accept the hold at first and record it (so apt will report it on showhold again), but as soon as the dpkg/status file is modified again (e.g. with another hold), the record for the uninstalled package is cleaned up removing the hold.

That is intended behavior by dpkg upstream according to earlier talks (and in there since ever, but I think the situations in which cleanup happens increased over time). We were thinking of having some way of having dpkg store such info even for not installed packages, but then life (& freeze) happened I guess, so there is nothing to show off apart from "yeah, we should be doing something, maybe".

Perhaps we should just change apt to not accept holds for non-installed packages until that is resolved in some way.

Julian Andres Klode (juliank) wrote :

Ah, that makes sense. Downgrading importance then to match that this is actually working as dpkg intends it to work and us not refusing it is really just a usability issue.

Changed in apt (Ubuntu):
importance: Medium → Low
Matthew North (matt-northsky) wrote :

Just to confirm, both packages are installed on my system. (Can't be much more help as am a few thousand miles away from it until Tues.)

Matthew North (matt-northsky) wrote :

Managed to get access, they weren't installed - once installed apt mark works as planned. Sorry for the wild goose chase, guys.

Changed in apt (Debian):
status: Unknown → New
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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