Unverified Commit f94d787c authored by Mattia Rizzolo's avatar Mattia Rizzolo
Browse files

fixup dsa-check-running-kernel again after ubuntu changed their packages



Now ubuntu's linux-image-generic package has
    Depends: linux-image-4.4.0-143-generic | linux-image-unsigned-4.4.0-143-generic
which caused the previous code to consider that as a single package
named "linux-image-4.4.0-143-generic|linux-image-unsigned-4.4.0-143-generic".

Let's just ignore the alternative and take the first one, since it works
for us that way anyway.

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent ac80b2b5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ get_avail() {

	local imagename=0
	# --no-all-versions show shows only the candidate
	for vers in $(apt-cache --no-all-versions show ${prefix}-image-${metavers} | sed -n 's/^Depends: //p' | tr ',' '\n' | tr -d ' ' | grep ${prefix}-image | awk '{print $1}' | sort -u); do
	for vers in $(apt-cache --no-all-versions show ${prefix}-image-${metavers} | sed -n 's/^Depends: //p' | tr ',' '\n' | tr -d ' ' | grep ${prefix}-image | awk '{print $1}' | awk -F"|" '{print $1}' | sort -u); do
		if dpkg --compare-versions "1.$vers" gt "1.$imagename"; then
			imagename=$vers
		fi