[Git][qa/jenkins.debian.net][master] jenkins nodes: don't warn about system updates for systems running Debian testing

Holger Levsen (@holger) gitlab at salsa.debian.org
Thu Jan 9 16:52:13 GMT 2025



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
154a6b4c by Holger Levsen at 2025-01-09T17:52:04+01:00
jenkins nodes: don't warn about system updates for systems running Debian testing

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_maintenance.sh


Changes:

=====================================
bin/reproducible_maintenance.sh
=====================================
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: set noexpandtab:
 
-# Copyright 2014-2024 Holger Levsen <holger at layer-acht.org>
+# Copyright 2014-2025 Holger Levsen <holger at layer-acht.org>
 #         © 2015-2023 Mattia Rizzolo <mattia at debian.org>
 # released under the GPLv2
 
@@ -875,27 +875,32 @@ fi
 #
 # checking for system updates
 #
-echo "$(date -u) - Checking for system updates."
-sudo apt-get update || true # maybe it's better to do force this running in the presence...
-TMPFILE=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXXX)
-apt list --upgradable 2>/dev/null > $TMPFILE
-if [ $(cat $TMPFILE | wc -l) -gt 1 ] ; then
-	if ( $(dpkg -l |grep linux-image | grep -q ^hi) && [ $(cat $TMPFILE | grep -v linux-image | wc -l) -gt 1 ] ) \
-		|| ( ! $(dpkg -l |grep linux-image | grep -q ^hi) && [ $(cat $TMPFILE | wc -l) -gt 1 ] ) ; then
-		echo "Warning: there are packages to be upgraded on this system."
-		DIRTY=true
-		cat $TMPFILE
-		if $(dpkg -l |grep linux-image | grep -q ^hi) ; then
-			echo "Note: linux-image is on hold:"
+# not on systems running testing...
+if grep -q sid /etc/debian_version ; then
+	echo "$(date -u) - Not checking for system updates because this system is running Debian testing and there are frequent updates."
+else
+	echo "$(date -u) - Checking for system updates."
+	sudo apt-get update || true # maybe it's better to do force this running in the presence...
+	TMPFILE=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXXX)
+	apt list --upgradable 2>/dev/null > $TMPFILE
+	if [ $(cat $TMPFILE | wc -l) -gt 1 ] ; then
+		if ( $(dpkg -l |grep linux-image | grep -q ^hi) && [ $(cat $TMPFILE | grep -v linux-image | wc -l) -gt 1 ] ) \
+			|| ( ! $(dpkg -l |grep linux-image | grep -q ^hi) && [ $(cat $TMPFILE | wc -l) -gt 1 ] ) ; then
+			echo "Warning: there are packages to be upgraded on this system."
+			DIRTY=true
+			cat $TMPFILE
+			if $(dpkg -l |grep linux-image | grep -q ^hi) ; then
+				echo "Note: linux-image is on hold:"
+				dpkg -l |grep linux-image | grep ^hi
+			fi
+		else
+			echo "Note: there is linux-image to be upgraded on this system, but linux-image is on hold:"
+			cat $TMPFILE
 			dpkg -l |grep linux-image | grep ^hi
 		fi
-	else
-		echo "Note: there is linux-image to be upgraded on this system, but linux-image is on hold:"
-		cat $TMPFILE
-		dpkg -l |grep linux-image | grep ^hi
 	fi
+	rm -f $TMPFILE
 fi
-rm -f $TMPFILE
 
 if ! $DIRTY ; then
 	echo "$(date -u ) - Everything seems to be fine."



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/154a6b4cbd30037fcb7be4a15d264e188fb98763

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/154a6b4cbd30037fcb7be4a15d264e188fb98763
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/20250109/4d882599/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list