Public bug reported:

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)

** Affects: apticron (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug hirsute

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1921000

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apticron/+bug/1921000/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to