[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] fixup dsa-check-running-kernel again after ubuntu changed their packages

Mattia Rizzolo gitlab at salsa.debian.org
Mon Mar 18 06:09:32 GMT 2019


Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net


Commits:
f94d787c by Mattia Rizzolo at 2019-03-18T06:07:37Z
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 <mattia at debian.org>

- - - - -


1 changed file:

- hosts/common/usr/local/bin/dsa-check-running-kernel


Changes:

=====================================
hosts/common/usr/local/bin/dsa-check-running-kernel
=====================================
@@ -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



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/f94d787c53673ad5b88bdd4038d92b5bdc0d275f

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/f94d787c53673ad5b88bdd4038d92b5bdc0d275f
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20190318/8db65bf6/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list