"checkupdates --download" not working in 1.10.3 because of commit 53c94a04
checkupdates --download
is broken in the latest pacman-contrib release, see here:
$ sudo checkupdates --download
ddcutil 2.1.0-4 -> 2.1.2-1
iotop-c 1.25-1 -> 1.25-3
lib32-faudio 23.12-1 -> 24.01-1
lib32-pixman 0.43.0-2 -> 0.43.2-1
...
error: target not found: ddcutil
error: target not found: iotop-c
error: target not found: lib32-faudio
error: target not found: lib32-pixman
...
This problem seems to be caused by commit 53c94a04. That commit added a --color
argument to a pacman call that's used to create an array of package names:
-mapfile -t updates < <(pacman -Qu --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '\[.*\]')
+
+if (( PACMAN_COLOR )); then
+ mapfile -t updates < <(pacman --color always -Qu --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '\[.*\]')
+else
+ mapfile -t updates < <(pacman -Qu --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '\[.*\]')
+fi
The elements in the 'updates' array then have color escape-codes in them, but that array is later used to build a command line for pacman for the download. The color codes break things for pacman there. That pacman command line looks like this:
runcmd pacman -Sw --noconfirm "${updates[@]%% *}" --dbpath "$CHECKUPDATES_DB" --logfile /dev/null