[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: refactor and send notifications to #reproducible-builds

Holger Levsen holger at layer-acht.org
Sun Jan 8 13:24:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 62dbfb39c5035ec20dae898eb5678fc2eb8fe5a7
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Jan 8 14:23:50 2017 +0100

    reproducible: refactor and send notifications to #reproducible-builds
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/diffoscope_distribution_test.sh | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/bin/diffoscope_distribution_test.sh b/bin/diffoscope_distribution_test.sh
index 073d59b..a5808be 100755
--- a/bin/diffoscope_distribution_test.sh
+++ b/bin/diffoscope_distribution_test.sh
@@ -10,6 +10,12 @@ common_init "$@"
 # common code (used for irc_message)
 . /srv/jenkins/bin/reproducible_common.sh
 
+send_irc_warning() {
+	local WARNING=$1
+	irc_message reproducible-builds "$WARNING"
+	echo "Warning: $WARNING"
+}
+
 check_pypi() {
 	TMPPYPI=$(mktemp -t diffoscope-distribution-XXXXXXXX)
 	# the following two lines are a bit fragile…
@@ -23,9 +29,7 @@ check_pypi() {
 	elif dpkg --compare-versions "$DIFFOSCOPE_IN_DEBIAN" gt "$DIFFOSCOPE_IN_PYPI" ; then
 		echo "Fail: diffoscope in Debian: $DIFFOSCOPE_IN_DEBIAN"
 		echo "Fail: diffoscope in PyPI:   $DIFFOSCOPE_IN_PYPI"
-		WARNING="It seems diffoscope $DIFFOSCOPE_IN_DEBIAN is not available on PyPI, which only has $DIFFOSCOPE_IN_PYPI."
-		irc_message debian-reproducible "$WARNING"
-		echo "Warning: $WARNING"
+		send_irc_warning "It seems diffoscope $DIFFOSCOPE_IN_DEBIAN is not available on PyPI, which only has $DIFFOSCOPE_IN_PYPI."
 		exit 0
 	else
 		echo "diffoscope in Debian: $DIFFOSCOPE_IN_DEBIAN"
@@ -47,9 +51,7 @@ check_whohas() {
 	elif dpkg --compare-versions "$DIFFOSCOPE_IN_DEBIAN" gt "$DIFFOSCOPE_IN_WHOHAS" ; then
 		echo "Fail: diffoscope in Debian: $DIFFOSCOPE_IN_DEBIAN"
 		echo "Fail: diffoscope in $DISTRIBUTION: $DIFFOSCOPE_IN_WHOHAS"
-		WARNING="It seems diffoscope $DIFFOSCOPE_IN_DEBIAN is not available in $DISTRIBUTION, which only has $DIFFOSCOPE_IN_WHOHAS."
-		irc_message debian-reproducible "$WARNING"
-		echo "Warning: $WARNING"
+		send_irc_warning "It seems diffoscope $DIFFOSCOPE_IN_DEBIAN is not available in $DISTRIBUTION, which only has $DIFFOSCOPE_IN_WHOHAS."
 		exit 0
 	else
 		# FIXME: archlinux package version will be greater than Debian: 52-1 vs 52

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list