with multiarch, apticron sometimes lists packages it shouldn't when NOTIFY_HOLDS=0

Bug #1921000 reported by Jonathan Kamens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apticron (Debian)
New
Unknown
apticron (Ubuntu)
New
Undecided
Unassigned

Bug Description

When using multiarch, `dpkg --get-selections` appends the system's default architecture to package names in some cases, but `apt-get -q -y -s dist-upgrade` doesn't, so the code in apticron to filter out held packages doesn't work.

Here's a fix:

--- /usr/sbin/apticron 2020-12-20 09:03:57.183515992 -0500
+++ apticron 2021-03-23 15:40:58.054450596 -0400
@@ -129,7 +129,7 @@

 # workaround to handle apt-get installing packages hold by aptitude. See #137771.
 APTITUDE_HOLDS=`grep "^State: 2" -B 3 /var/lib/aptitude/pkgstates 2>/dev/null |grep "^Package: .*$" |cut -d" " -f 2`
-DSELECT_HOLDS=`dpkg --get-selections |grep "hold$" |cut -f1`
+DSELECT_HOLDS=`dpkg --get-selections |grep "hold$" |cut -f1 |sed -e "s/:$(dpkg --print-architecture)$//"`

 if [ "$NOTIFY_HOLDS" = "0" ]; then
  # packages hold by aptitude don't go to the upgrading candidates list

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: apticron 1.2.3+nmu1 [modified: usr/sbin/apticron]
ProcVersionSignature: Ubuntu 5.10.0-14.15-generic 5.10.11
Uname: Linux 5.10.0-14-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu60
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Tue Mar 23 15:52:39 2021
InstallationDate: Installed on 2019-01-02 (811 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
PackageArchitecture: all
SourcePackage: apticron
UpgradeStatus: Upgraded to hirsute on 2021-02-21 (30 days ago)

Revision history for this message
Jonathan Kamens (jik) wrote :
Changed in apticron (Debian):
status: Unknown → New
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.