[Piuparts-commits] [SCM] piatti.debian.org configuration files branch, develop, updated. bd576b4d2a7b962aad4245414b3a858dec5e52c6

Andreas Beckmann debian at abeckmann.de
Fri Dec 2 13:15:08 UTC 2011


The following commit has been merged in the develop branch:
commit 4e5522531abb34910d502a50a67bd2218a92eb4f
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Wed Nov 30 14:59:14 2011 +0100

    count repeated archive issues
    
    keep track of old archive issues in $HTDOCS/archive_issues.txt
    and report the number an issue has been repeated
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/home/piupartsm/bin/detect_archive_issues b/home/piupartsm/bin/detect_archive_issues
index 72bd0a8..2cba81a 100755
--- a/home/piupartsm/bin/detect_archive_issues
+++ b/home/piupartsm/bin/detect_archive_issues
@@ -38,6 +38,8 @@ get_config_value()
 
 get_config_value MASTER global master-directory
 get_config_value SECTIONS global sections
+get_config_value HTDOCS global output-directory
+get_config_value URLBASE global urlbase http://piuparts.debian.org
 
 
 #
@@ -45,15 +47,22 @@ get_config_value SECTIONS global sections
 #
 
 LOGS=`mktemp`
+URLS=`mktemp`
 for SECTION in $SECTIONS ; do 
-	rgrep -l -E "(E: Broken packages|E: Error, pkgProblemResolver::Resolve generated breaks)" $MASTER/$SECTION/fail 2>/dev/null >> $LOGS
-        if [ -s $LOGS ] ; then 
-          for package_log in $(grep $SECTION $LOGS) ; do 
-		mv $package_log $MASTER/$SECTION/untestable/
-	  done
-        fi
+	mkdir -p $MASTER/$SECTION/untestable/
+	rgrep -l -E "(E: Broken packages|E: Error, pkgProblemResolver::Resolve generated breaks)" $MASTER/$SECTION/fail 2>/dev/null > $LOGS
+	if [ -s $LOGS ]; then
+		for package_log in $(cat $LOGS)
+		do
+			mv $package_log $MASTER/$SECTION/untestable/
+		done
+		sed "s#$MASTER/$SECTION/fail#$URLBASE/$SECTION/untestable#" $LOGS >> $URLS
+	fi
 done
-if [ -s $LOGS ] ; then 
+if [ -s $URLS ]; then
+	mkdir -p $HTDOCS
+	date >> $HTDOCS/archive_issues.txt
+	cat $URLS >> $HTDOCS/archive_issues.txt
 	echo "Broken packages detected!"
 	echo "(By grep'ing for 'E: Broken packages' and 'E: Error, pkgProblemResolver::Resolve"
         echo "generated breaks' in failed logs.)"
@@ -61,13 +70,13 @@ if [ -s $LOGS ] ; then
 	echo 'The following packages have been moved to $section/untestable and will be'
 	echo "tested again in 7 days."
 	echo
-        echo "Broken packages are usually a temporarily problem in the archive and are"
+        echo "Broken packages are usually a temporary 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 "If it is always the same package failing, it's likely to be an issue in the"
 	echo "package."
 	echo
-	cat $LOGS | sed -e "s#$MASTER#http://piuparts.debian.org/#g" -e "s#/fail#/untestable#g"
+	grep -f $URLS $HTDOCS/archive_issues.txt | sort | uniq -c | sort -rn
 	echo
 fi
-rm $LOGS
+rm $LOGS $URLS

-- 
piatti.debian.org configuration files



More information about the Piuparts-commits mailing list