Comment 6 for bug 2012750

Revision history for this message
satmandu (satadru-umich) wrote :

The problem is I suspect this change to the functions file between flash-kernel_3.106ubuntu8.1 and flash-kernel_3.106ubuntu14, as this is where the "dpkg-query: no packages found matching" error comes from.

+get_kernel_status() {
+ # get_kernel_status(query_ver)
+ # return the dpkg package status of kernel version $query_ver
+ local query_ver="$1"
+ local ver path pkg
+ linux-version list --paths | while read -r ver path; do
+ if linux-version compare "$ver" eq "$query_ver"; then
+ pkg=$(
+ LANG=C.UTF-8 dpkg-query --search "$path" 2>/dev/null |
+ awk -F ": " -v path="$path" '$2==path { print $1; }'
+ )
+ LANG=C.UTF-8 dpkg-query --show --showformat '${db:Status-Status}' "$pkg"
+ break
+ fi
+ done
+}
+

I will debug more, but this is what I see:
linux-version list --paths | while read -r ver path; do echo $ver $path ; done
6.1.12-v8+ /boot/vmlinuz-6.1.12-v8+
6.1.13-v8+ /boot/vmlinuz-6.1.13-v8+
6.1.14-v8+ /boot/vmlinuz-6.1.14-v8+
6.1.16-v8+ /boot/vmlinuz-6.1.16-v8+
6.1.19-v8+ /boot/vmlinuz-6.1.19-v8+
6.1.20-v8+ /boot/vmlinuz-6.1.20-v8+
6.1.21-v8+ /boot/vmlinuz-6.1.21-v8+
6.1.23-v8+ /boot/vmlinuz-6.1.23-v8+