[Piuparts-devel] [Git][debian/piuparts][develop] WIP: reduce number of mails per day, from 32 down to 24, see #912591.

Holger Levsen gitlab at salsa.debian.org
Tue Nov 27 19:25:40 GMT 2018


Holger Levsen pushed to branch develop at Debian / piuparts


Commits:
71cd6fc8 by Holger Levsen at 2018-11-27T19:25:07Z
WIP: reduce number of mails per day, from 32 down to 24, see #912591.

master-bin/detect_piuparts_issues: redirect logs to htdocs/logs to spare
us eight mails per day.

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

- - - - -


2 changed files:

- debian/changelog
- master-bin/detect_piuparts_issues.in


Changes:

=====================================
debian/changelog
=====================================
@@ -2,9 +2,11 @@ piuparts (0.95) UNRELEASED; urgency=medium
 
   * piuparts.py: add /var/lib/debian-security-support/ to self.ignored_files.
     (Closes: #749317)
-  * WIP: reduce number of mails per day, from currently 34 down to? see #912591
+  * WIP: reduce number of mails per day, from 34 down to 24, see #912591.
     - master-bin/detect_archive_issues: redirect logs to htdocs/logs to spare
       us two mails per day.
+    - master-bin/detect_piuparts_issues: redirect logs to htdocs/logs to spare
+      us eight mails per day.
     - lib/write_log.sh: new helper to publish logs in htdocs/logs.
 
  -- Holger Levsen <holger at debian.org>  Thu, 08 Nov 2018 12:12:21 +0100


=====================================
master-bin/detect_piuparts_issues.in
=====================================
@@ -18,11 +18,13 @@
 
 
 . @sharedir@/piuparts/lib/read_config.sh
+. @sharedir@/piuparts/lib/write_log.sh
 
 get_config_value MASTER global master-directory
 get_config_value SECTIONS global sections
 
 STARTDATE=$(date -u +%s)
+TEMPORARY_OUTPUT=`mktemp`
 
 #
 # detect piuparts problems
@@ -95,24 +97,28 @@ done
 if [ -s $FILE ] ; then
 	FINALDATE=$(date -u +%s)
 	RUNTIME=$(date -u -d "0 $FINALDATE seconds - $STARTDATE seconds" +%T)
-	echo "Runtime: $RUNTIME"
-	echo
-	echo "piuparts problems detected! Please review the following logfiles/packages."
-	echo "If it is always the same package failing, it's likely to be an issue in the"
-	echo "package."
-	echo
-	echo "The following logfiles have been deleted:"
-	echo
-	for log in $(sort -u $FILE)
-	do
-		echo "$log" | cut -d "/" -f5-
-		test -s "$log" || echo "${tab}Empty logfile."
-		grep -E "$PATTERN" "$log" | perl -e 'print grep !$seen{$_}++, <>;' | head -n 10 | sed "s/^/${tab}/"
-		rm -f "$log"
-	done
-	echo
-	echo "Those problems were found in failed logs by grep'ing for these patterns:"
-	echo "$DISPLAY_PATTERN"
-	echo
+	(
+		echo "$(date -u)"
+		echo "Runtime: $RUNTIME"
+		echo
+		echo "piuparts problems detected! Please review the following logfiles/packages."
+		echo "If it is always the same package failing, it's likely to be an issue in the"
+		echo "package."
+		echo
+		echo "The following logfiles have been deleted:"
+		echo
+		for log in $(sort -u $FILE)
+		do
+			echo "$log" | cut -d "/" -f5-
+			test -s "$log" || echo "${tab}Empty logfile."
+			grep -E "$PATTERN" "$log" | perl -e 'print grep !$seen{$_}++, <>;' | head -n 10 | sed "s/^/${tab}/"
+			rm -f "$log"
+		done
+		echo
+		echo "Those problems were found in failed logs by grep'ing for these patterns:"
+		echo "$DISPLAY_PATTERN"
+		echo
+	) > $TEMPORARY_OUTPUT
+	publish_logs $TEMPORARY_OUTPUT $HTDOCS piuparts_issues
 fi
 rm $FILE



View it on GitLab: https://salsa.debian.org/debian/piuparts/commit/71cd6fc86fed7227030f472bd66f41711a6c1939

-- 
View it on GitLab: https://salsa.debian.org/debian/piuparts/commit/71cd6fc86fed7227030f472bd66f41711a6c1939
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/piuparts-devel/attachments/20181127/6c0bbd43/attachment-0001.html>


More information about the Piuparts-devel mailing list