When we ask apt-cache for information on the metapackage to extract the
actual kernel image it depends on, we sort that output. It's not clear
why we do that, since we pass the option --no-all-versions to apt-cache
so we should only get one answer anyhow. Nevertheless, since we sort we
might just as well use -V to version sort that output. dpkg-version
sort would be even better, but hey. This is based on Erik Auerswald's
patch in #884328.
local imagename=0
# --no-all-versions show shows only the candidate
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}' | sort -Vu); do
if dpkg --compare-versions "1.$vers" gt "1.$imagename"; then
imagename=$vers
fi
if dpkg --compare-versions "1.$vers" gt "1.$imagename"; then
imagename=$vers
fi
* port dsa-check-statusfile and dsa-check-memory to python3
* dsa-check-zone-signature-all: tell dig not to convert punycode.
* port dsa-check-statusfile and dsa-check-memory to python3
* dsa-check-zone-signature-all: tell dig not to convert punycode.
+ [ Peter Palfrader ]
+ * dsa-check-running-kernel: When we ask apt-cache for information on
+ the metapackage to extract the actual kernel image it depends on, we
+ sort that output. It's not clear why we do that, since we pass the
+ option --no-all-versions to apt-cache so we should only get one answer
+ anyhow. Nevertheless, since we sort we might just as well use -V
+ to version sort that output. dpkg-version sort would be even better,
+ but hey. This is based on Erik Auerswald's patch in #884328.
+
-- Peter Palfrader <weasel@debian.org> Mon, 20 May 2019 12:52:00 +0200
dsa-nagios-checks (118) unstable; urgency=medium
-- Peter Palfrader <weasel@debian.org> Mon, 20 May 2019 12:52:00 +0200
dsa-nagios-checks (118) unstable; urgency=medium