Verified Commit 490e125a authored by Mattia Rizzolo's avatar Mattia Rizzolo
Browse files

dsa-check-running-kernel: fix a new apparent breakage



since a while we are seeing this with the backports kernel:
% dsa-check-running-kernel                                                                                                                  :(
dpkg: warning: version '1.linux-image-5.3.0-0.bpo.2-amd64(=5.3.9-2~bpo10+1)' has bad syntax: invalid character in version number
dpkg: warning: version '1.linux-image-5.3.0-0.bpo.2-amd64(=5.3.9-2~bpo10+1)' has bad syntax: invalid character in version number
WARNING: Kernel needs upgrade [linux-image-5.3.0-0.bpo.2-amd64(=5.3.9-2~bpo10+1) != linux-image-5.3.0-0.bpo.2-amd64]

likely due to the unversioned package now having versioned dependencies,
which is a new thing.

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 2528a65e
...@@ -94,7 +94,7 @@ get_avail() { ...@@ -94,7 +94,7 @@ get_avail() {
local imagename=0 local imagename=0
# --no-all-versions show shows only the candidate # --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}' | awk -F"|" '{print $1}' | sort -Vu); do for vers in $(apt-cache --no-all-versions show ${prefix}-image-${metavers} | sed -n 's/^Depends: //p' | tr ',' '\n' | awk '{print $1}' | grep ${prefix}-image | awk -F"|" '{print $1}' | sort -Vu); do
if dpkg --compare-versions "1.$vers" gt "1.$imagename"; then if dpkg --compare-versions "1.$vers" gt "1.$imagename"; then
imagename=$vers imagename=$vers
fi fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment