<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<h3>
Mattia Rizzolo pushed to branch master
at <a href="https://salsa.debian.org/qa/jenkins.debian.net">Debian QA / jenkins.debian.net</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://salsa.debian.org/qa/jenkins.debian.net/commit/2528a65e9f463ff787842c557f00a6889d1e4a14">2528a65e</a></strong>
<div>
<span>by Mattia Rizzolo</span>
<i>at 2019-12-01T16:09:03Z</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Take in a patch from dsa-nagios

This is from this commit of the dsa-nagios.git.

commit d95cb3856c48aff6792f8a6799fb1f37d44c4c51
Author:     Peter Palfrader <peter@palfrader.org>
AuthorDate: Mon Oct 14 11:49:28 2019 +0200
Commit:     Peter Palfrader <peter@palfrader.org>
CommitDate: Mon Oct 14 11:49:28 2019 +0200

    dsa-check-running-kernel: sort kernel versions better

    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.

Signed-off-by: Mattia Rizzolo <mattia@debian.org>
</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class="file-stats">
<a href="#6346b92a171d8bc28c9d0fbc49f6e3cccffdf785">
hosts/common/usr/local/bin/dsa-check-running-kernel
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id="6346b92a171d8bc28c9d0fbc49f6e3cccffdf785">
<a href="https://salsa.debian.org/qa/jenkins.debian.net/commit/2528a65e9f463ff787842c557f00a6889d1e4a14#6346b92a171d8bc28c9d0fbc49f6e3cccffdf785"><strong>hosts/common/usr/local/bin/dsa-check-running-kernel</strong></a>
<hr>
<table class="code white" style="font-family: monospace; font-size: 90%;" bgcolor="#fff" width="100%" cellpadding="0" cellspacing="0">
<tr class="line_holder match" id="" style="line-height: 1.6;">
<td class="diff-line-num unfold js-unfold old_line" data-linenumber="94" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">...</td>
<td class="diff-line-num unfold js-unfold new_line" data-linenumber="94" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">...</td>
<td class="line_content match " style="padding-left: 0.5em; padding-right: 0.5em; color: rgba(0,0,0,0.3);" bgcolor="#fafafa">@@ -94,7 +94,7 @@ get_avail() {</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="94" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
94
</td>
<td class="diff-line-num new_line" data-linenumber="94" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
94
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC94" class="line" lang="shell"></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="95" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
95
</td>
<td class="diff-line-num new_line" data-linenumber="95" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
95
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC95" class="line" lang="shell"><span class="k" style="font-weight: 600;">     </span><span class="nb" style="color: #0086b3;">local </span><span class="nv" style="color: #008080;">imagename</span><span class="o" style="font-weight: 600;">=</span>0</span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="96" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
96
</td>
<td class="diff-line-num new_line" data-linenumber="96" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
96
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC96" class="line" lang="shell"> <span class="c" style="color: #998; font-style: italic;"># --no-all-versions show shows only the candidate</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="" style="line-height: 1.6;">
<td class="diff-line-num old old_line" data-linenumber="97" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
97
</td>
<td class="diff-line-num new_line old" data-linenumber="97" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC97" class="line" lang="shell"> <span class="k" style="font-weight: 600;">for </span>vers <span class="k" style="font-weight: 600;">in</span> <span class="si" style="color: #d14;">$(</span>apt-cache <span class="nt" style="color: #000080;">--no-all-versions</span> show <span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: #008080;">prefix</span><span class="k" style="font-weight: 600;">}</span><span class="nt" style="color: #000080;">-image-</span><span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: #008080;">metavers</span><span class="k" style="font-weight: 600;">}</span> | <span class="nb" style="color: #0086b3;">sed</span> <span class="nt" style="color: #000080;">-n</span> <span class="s1" style="color: #d14;">'s/^Depends: //p'</span> | <span class="nb" style="color: #0086b3;">tr</span> <span class="s1" style="color: #d14;">','</span> <span class="s1" style="color: #d14;">'\n'</span> | <span class="nb" style="color: #0086b3;">tr</span> <span class="nt" style="color: #000080;">-d</span> <span class="s1" style="color: #d14;">' '</span> | <span class="nb" style="color: #0086b3;">grep</span> <span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: #008080;">prefix</span><span class="k" style="font-weight: 600;">}</span><span class="nt" style="color: #000080;">-image</span> | <span class="nb" style="color: #0086b3;">awk</span> <span class="s1" style="color: #d14;">'{print $1}'</span> | <span class="nb" style="color: #0086b3;">awk</span> <span class="nt" style="color: #000080;">-F</span><span class="s2" style="color: #d14;">"|"</span> <span class="s1" style="color: #d14;">'{print $1}'</span> | <span class="nb" style="color: #0086b3;">sort</span> <span class="nt" style="color: #000080;">-u</span><span class="si" style="color: #d14;">)</span><span class="p">;</span> <span class="k" style="font-weight: 600;">do</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="" style="line-height: 1.6;">
<td class="diff-line-num new old_line" data-linenumber="98" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="97" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
97
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC97" class="line" lang="shell"> <span class="k" style="font-weight: 600;">for </span>vers <span class="k" style="font-weight: 600;">in</span> <span class="si" style="color: #d14;">$(</span>apt-cache <span class="nt" style="color: #000080;">--no-all-versions</span> show <span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: #008080;">prefix</span><span class="k" style="font-weight: 600;">}</span><span class="nt" style="color: #000080;">-image-</span><span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: #008080;">metavers</span><span class="k" style="font-weight: 600;">}</span> | <span class="nb" style="color: #0086b3;">sed</span> <span class="nt" style="color: #000080;">-n</span> <span class="s1" style="color: #d14;">'s/^Depends: //p'</span> | <span class="nb" style="color: #0086b3;">tr</span> <span class="s1" style="color: #d14;">','</span> <span class="s1" style="color: #d14;">'\n'</span> | <span class="nb" style="color: #0086b3;">tr</span> <span class="nt" style="color: #000080;">-d</span> <span class="s1" style="color: #d14;">' '</span> | <span class="nb" style="color: #0086b3;">grep</span> <span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: #008080;">prefix</span><span class="k" style="font-weight: 600;">}</span><span class="nt" style="color: #000080;">-image</span> | <span class="nb" style="color: #0086b3;">awk</span> <span class="s1" style="color: #d14;">'{print $1}'</span> | <span class="nb" style="color: #0086b3;">awk</span> <span class="nt" style="color: #000080;">-F</span><span class="s2" style="color: #d14;">"|"</span> <span class="s1" style="color: #d14;">'{print $1}'</span> | <span class="nb" style="color: #0086b3;">sort</span> <span class="nt" style="color: #000080;">-<span class="idiff left right">V</span>u</span><span class="si" style="color: #d14;">)</span><span class="p">;</span> <span class="k" style="font-weight: 600;">do</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="98" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
98
</td>
<td class="diff-line-num new_line" data-linenumber="98" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
98
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC98" class="line" lang="shell"><span class="k" style="font-weight: 600;">             if </span>dpkg <span class="nt" style="color: #000080;">--compare-versions</span> <span class="s2" style="color: #d14;">"1.</span><span class="nv" style="color: #008080;">$vers</span><span class="s2" style="color: #d14;">"</span> gt <span class="s2" style="color: #d14;">"1.</span><span class="nv" style="color: #008080;">$imagename</span><span class="s2" style="color: #d14;">"</span><span class="p">;</span> <span class="k" style="font-weight: 600;">then</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="99" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
99
</td>
<td class="diff-line-num new_line" data-linenumber="99" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
99
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC99" class="line" lang="shell"><span class="k" style="font-weight: 600;">                     </span><span class="nv" style="color: #008080;">imagename</span><span class="o" style="font-weight: 600;">=</span><span class="nv" style="color: #008080;">$vers</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="" style="line-height: 1.6;">
<td class="diff-line-num old_line" data-linenumber="100" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
100
</td>
<td class="diff-line-num new_line" data-linenumber="100" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
100
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC100" class="line" lang="shell">                <span class="k" style="font-weight: 600;">fi</span></span>
</pre>
</td>
</tr>

</table>
<br>
</li>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">

<br>
<a href="https://salsa.debian.org/qa/jenkins.debian.net/commit/2528a65e9f463ff787842c557f00a6889d1e4a14">View it on GitLab</a>.
<br>
You're receiving this email because of your account on salsa.debian.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://salsa.debian.org/qa/jenkins.debian.net/commit/2528a65e9f463ff787842c557f00a6889d1e4a14"}}</script>


</p>
</div>
</body>
</html>