[Piuparts-commits] [SCM] piatti.debian.org configuration files branch, piatti, updated. 0.42-7-gae866ba

Andreas Beckmann debian at abeckmann.de
Thu Jan 5 10:32:00 UTC 2012


The following commit has been merged in the piatti branch:
commit a634393a21fb3ee48fcbcb8ba1937d36c8c507b4
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Thu Jan 5 01:07:12 2012 +0100

    simplify/cleanup detect_well_known_errors
    
    merge the loops, reduce verboseness, skip missing sections
    remove the 'unknown failures' report if it's empty
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/home/piupartsm/bin/detect_well_known_errors b/home/piupartsm/bin/detect_well_known_errors
index fcb8b19..ed1f039 100755
--- a/home/piupartsm/bin/detect_well_known_errors
+++ b/home/piupartsm/bin/detect_well_known_errors
@@ -48,10 +48,16 @@ OLDPWD=$(pwd)
 
 
 LOGS=`mktemp`
+ALLKPR=`mktemp`
+KNOWNLOGS=`mktemp`
+UNKNOWNLOGS=`mktemp`
+KNOWNFAILURES=`mktemp`
 
 for SECTION in $SECTIONS
 do
+	test -d $MASTER/$SECTION || continue
 	date
+	echo $SECTION:
 	cd $MASTER/$SECTION
 
 	#
@@ -99,21 +105,9 @@ do
 	done
 	ADDED=$(wc -l $LOGS | awk '{ print $1 }')
 
-	echo "$SECTION: parsed logfiles: $REMOVED removed, $ADDED added"
-	cd "$OLDPWD"
-done
+	echo "parsed logfiles: $REMOVED removed, $ADDED added"
 
-ALLKPR=`mktemp`
-KNOWNLOGS=`mktemp`
-UNKNOWNLOGS=`mktemp`
-KNOWNFAILURES=`mktemp`
-
-for SECTION in $SECTIONS
-do
-	date
-	echo $SECTION:
 	mkdir -p $HTDOCS/$SECTION
-	cd $MASTER/$SECTION
 	find pass bugged fail -name '*.kpr' | xargs --no-run-if-empty cat > $ALLKPR
 	cut -d' ' -f 2 $ALLKPR | sort | uniq -c
 	>$KNOWNLOGS
@@ -189,9 +183,10 @@ do
 		done
 		echo "</ul>" >> $OUTPUT
 		echo "<p>Affected packages in $SECTION: $COUNT</p></td></tr></table>" >> $OUTPUT
+		test $COUNT -gt 0 || rm $OUTPUT
 	fi
 	cd "$OLDPWD"
 done
-rm $ALLKPR $LOGS $KNOWNLOGS $UNKNOWNLOGS $KNOWNFAILURES
+rm $LOGS $ALLKPR $KNOWNLOGS $UNKNOWNLOGS $KNOWNFAILURES
 date
 

-- 
piatti.debian.org configuration files



More information about the Piuparts-commits mailing list