[Piuparts-devel] [Git][debian/piuparts][develop] redirect output to htdocs/logs

Holger Levsen gitlab at salsa.debian.org
Sun Dec 2 13:47:06 GMT 2018


Holger Levsen pushed to branch develop at Debian / piuparts


Commits:
3fd152b8 by Holger Levsen at 2018-12-02T13:46:50Z
redirect output to htdocs/logs

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

- - - - -


2 changed files:

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


Changes:

=====================================
debian/changelog
=====================================
@@ -12,8 +12,9 @@ piuparts (0.95) UNRELEASED; urgency=medium
       - include listing of htdocs/logs/$TODAY into daily report.
       - publish dailyreport.txt in htdocs/logs/$TODAY instead of htdocs/.
     - master-bin/detect_archive_issues, detect_piuparts_issues,
-      detect_network_issues, reschedule_oldest_logs, rotate_master_logs and
-      report_untestable_packages: redirect logs to htdocs/logs.
+      detect_network_issues, reschedule_oldest_logs, rotate_master_logs,
+      report_untestable_packages and report_stale_reserved_packages: redirect
+      logs to htdocs/logs.
     - conf/crontab-master.in: run detect_well_known_errors, piuparts-report
       and piuparts-analyze through the new master_shell_runner script.
     - master-bin/rotate_master_logs: compress htdocs/logs older than a week.


=====================================
master-bin/report_stale_reserved_packages.in
=====================================
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright 2009,2010 Holger Levsen (holger at layer-acht.org)
+# Copyright 2009-2018 Holger Levsen (holger at layer-acht.org)
 # Copyright © 2011-2012 Andreas Beckmann (anbe at debian.org)
 #
 # This program is free software; you can redistribute it and/or modify it
@@ -16,12 +16,12 @@
 # You should have received a copy of the GNU General Public License along
 # with this program. If not, see <https://www.gnu.org/licenses/>
 
-
 . @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
-
+get_config_value HTDOCS global output-directory
 
 #
 # find packages which have been reserved for more than one day and unschedule them
@@ -34,11 +34,13 @@ for SECTION in $SECTIONS ; do
 	find $MASTER/$SECTION/reserved/ -mtime +$DAYS -name "*.log" 2>/dev/null >> $LOGS
 done
 if [ -s $LOGS ] ; then
-	echo "Stale reserved packages detected, which have been reserved more then $DAYS days ago!"
-	echo "These packages have been unscheduled."
-	echo
+	LOG_OUTPUT=$(mktemp)
+	echo "Stale reserved packages detected, which have been reserved more then $DAYS days ago!" > $LOG_OUTPUT
+	echo "These packages have been unscheduled." >> $LOG_OUTPUT
+	echo >> $LOG_OUTPUT
 	for package_log in $(cat $LOGS) ; do
-		rm -fv $package_log
+		rm -fv $package_log >> $LOG_OUTPUT
 	done
+	publish_logs $LOG_OUTPUT "" $HTDOCS report_stale_reserved_packages
 fi
 rm $LOGS



View it on GitLab: https://salsa.debian.org/debian/piuparts/commit/3fd152b869b3b9bebacc46c886fa604cf92c3078

-- 
View it on GitLab: https://salsa.debian.org/debian/piuparts/commit/3fd152b869b3b9bebacc46c886fa604cf92c3078
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/20181202/68611b5f/attachment-0001.html>


More information about the Piuparts-devel mailing list