[Piuparts-commits] rev 375 - piatti/home/piupartsm piatti/home/piupartsm/bin trunk
Holger Levsen
holger at alioth.debian.org
Mon Apr 27 14:39:44 UTC 2009
Author: holger
Date: 2009-04-27 14:39:44 +0000 (Mon, 27 Apr 2009)
New Revision: 375
Added:
piatti/home/piupartsm/bin/report_persistent_untestable_packages
Modified:
piatti/home/piupartsm/bin/detect_archive_issues
piatti/home/piupartsm/bin/report_untestable_packages
piatti/home/piupartsm/crontab
trunk/TODO
Log:
- automatically reschedule uninstallable packages after 5 days (so there is some time the issue gets resolved in the archive)
- send warnings about packages which are uninstallable for each 15 days
Modified: piatti/home/piupartsm/bin/detect_archive_issues
===================================================================
--- piatti/home/piupartsm/bin/detect_archive_issues 2009-04-23 18:52:08 UTC (rev 374)
+++ piatti/home/piupartsm/bin/detect_archive_issues 2009-04-27 14:39:44 UTC (rev 375)
@@ -16,33 +16,33 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# detect packages which are/were untestable due to archive issue and mark them as such
+#
+
MASTER=/org/piuparts.debian.org/master
DISTROS="sid squeeze"
-FILE=`mktemp`
+LOGS=`mktemp`
for distro in $DISTROS ; do
- rgrep -l "E: Broken packages" $MASTER/$distro/fail >> $FILE
+ rgrep -l "E: Broken packages" $MASTER/$distro/fail >> $LOGS
+ grep $distro $FILE | xargs mv $MASTER/$distro/untestable/
done
-
-if [ -s $FILE ] ; then
+if [ -s $LOGS ] ; then
echo "Broken packages detected!"
echo
- echo "Please review the following logfiles and most likely remove them. "
+ echo 'The following packages have been moved to $distro/untestable and will be'
+ echo "tested again in 5 days."
+ echo
echo "Broken packages are usually a temporarily problem in the archive and are"
echo "caught by other tools like britney or http://edos.debian.net/edos-debcheck/"
echo
echo "If is is always the same package failing, it's likely to be an issue in the"
echo "package."
echo
- cat $FILE | sed -e "s#/org/piuparts.debian.org/master/#http://piuparts.debian.org/#g"
+ cat $LOGS | sed -e "s#/org/piuparts.debian.org/master/#http://piuparts.debian.org/#g" -e "s#/fail#/untestable#g"
echo
- cat $FILE | sed -e "s#/org/piuparts.debian.org/master/#less /org/piuparts.debian.org/master/#"
- echo
- echo "----------------------------------------------------------------------"
- echo
- cat $FILE | sed -e "s#/org/piuparts.debian.org/master/#rm /org/piuparts.debian.org/master/#"
- echo
fi
-rm $FILE
+rm $LOGS
Added: piatti/home/piupartsm/bin/report_persistent_untestable_packages
===================================================================
--- piatti/home/piupartsm/bin/report_persistent_untestable_packages (rev 0)
+++ piatti/home/piupartsm/bin/report_persistent_untestable_packages 2009-04-27 14:39:44 UTC (rev 375)
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# Copyright 2009 Holger Levsen (holger at layer-acht.org)
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+MASTER=/org/piuparts.debian.org/master
+
+#
+# find packages which have been in untestable for more than 15 days and reschedule them for testing
+#
+
+find $MASTER/*/untestable/archive -mtime +15 -name "*.log" > $LOGS
+if [ -s $LOGS ] ; then
+ for package_log in $(cat $LOGS) ; do
+ rm -f $package_log
+ done
+ echo "Persistent untestable packages detected, which have been untestable for 15 days!"
+ echo
+ echo "This is quite unusual, please investigate, probably using http://edos.debian.net/edos-debcheck/"
+ echo
+ echo "$LOGS"
+fi
+rm $LOGS
Property changes on: piatti/home/piupartsm/bin/report_persistent_untestable_packages
___________________________________________________________________
Added: svn:executable
+ *
Modified: piatti/home/piupartsm/bin/report_untestable_packages
===================================================================
--- piatti/home/piupartsm/bin/report_untestable_packages 2009-04-23 18:52:08 UTC (rev 374)
+++ piatti/home/piupartsm/bin/report_untestable_packages 2009-04-27 14:39:44 UTC (rev 375)
@@ -16,14 +16,34 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-LOGS=$(find /org/piuparts.debian.org/master/*/untestable/ -name "*.log")
+MASTER=/org/piuparts.debian.org/master
+DISTROS="sid squeeze"
-if [ $(echo "$LOGS" | wc -l ) -gt 0 ] ; then
- echo "Untestable packages detected!"
+#
+# find packages which have been in untestable for more than 5 days and reschedule them for testing
+#
+
+LOGS=`mktemp`
+find $MASTER/*/untestable/ -mtime +5 -name "*.log" > $LOGS
+if [ -s $LOGS ] ; then
+ for distro in $DISTROS ; do
+ mkdir -p $MASTER/$distro/untestable/archive
+ for package_log in $(grep $distro $LOGS) ; do
+ if [ ! -f $MASTER/$distro/untestable/archive/$(basename $package_log) ] ; then
+ mv $package_log $MASTER/$distro/untestable/archive/
+ fi
+ rm -f $package_log
+ done
+ done
+ echo "Untestable packages detected, which have been tested more than 5 days ago!"
+ echo "These packages have been rescheduling for piuparts testing."
+ echo
+ echo "If they continue to fail testing, you will be informed again in 10 days."
+ echo
echo "This is usually because a package was reserverd with a specific version and then"
- echo "a higher version became available and the reserved version vanished."
+ echo "a higher version became available and the reserved version vanished. So it's good"
+ echo "to test them again."
echo
echo "$LOGS"
- echo
- echo "Please investigate and cleanup."
fi
+rm $LOGS
Modified: piatti/home/piupartsm/crontab
===================================================================
--- piatti/home/piupartsm/crontab 2009-04-23 18:52:08 UTC (rev 374)
+++ piatti/home/piupartsm/crontab 2009-04-27 14:39:44 UTC (rev 375)
@@ -23,8 +23,10 @@
#
# monitor for problems once a day
#
-43 0 * * * /home/piupartsm/bin/detect_stale_mounts
-44 0 * * * /home/piupartsm/bin/detect_tmp_cruft
-45 0 * * * /home/piupartsm/bin/detect_network_issues
-46 0 * * * /home/piupartsm/bin/detect_archive_issues
-47 0 * * * /home/piupartsm/bin/report_untestable_packages
+45 0 * * * /home/piupartsm/bin/detect_stale_mounts
+50 0 * * * /home/piupartsm/bin/detect_tmp_cruft
+55 0 * * * /home/piupartsm/bin/detect_network_issues
+0 1 * * * /home/piupartsm/bin/detect_archive_issues
+05 1 * * * /home/piupartsm/bin/report_persistent_untestable_packages
+10 1 * * * /home/piupartsm/bin/report_untestable_packages
+
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2009-04-23 18:52:08 UTC (rev 374)
+++ trunk/TODO 2009-04-27 14:39:44 UTC (rev 375)
@@ -3,8 +3,6 @@
for 0.36:
-- broken packages should be moved to untestable, and untestable log files
- should be deleted automatically after a week
- then R
- take care of old conf files on upgrades
/etc/piuparts/piuparts-master.conf
More information about the Piuparts-commits
mailing list