[Piuparts-commits] [SCM] piatti.debian.org configuration files branch, master, updated. 148332ef45997ba3aaf38cc2c9a28441083bad49

Andreas Beckmann debian at abeckmann.de
Fri Dec 23 10:24:09 UTC 2011


The following commit has been merged in the master branch:
commit caf537796e15d935c96ee37f8c70c12f45f0990b
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Mon Nov 28 02:56:13 2011 +0100

    find log files with relative paths
    
    Since we already changed to the section directory we can search
    for log files with relative paths. That way we also don't need
    to hardcode a number of slashes in the absolute path prefix that
    needs to be removed and we save a few cut's per log file.
    
    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 6211aa5..50ca99e 100755
--- a/home/piupartsm/bin/detect_well_known_errors
+++ b/home/piupartsm/bin/detect_well_known_errors
@@ -59,9 +59,9 @@ for SECTION in $SECTIONS ; do
 			COUNT=0
 			for LOG in $(cat $LOGS|sort) ; do
 				PACKAGE=$(echo $LOG | cut -d "_" -f1|cut -d "/" -f2)
-				LATEST=$(ls -tr1 --color=none $MASTER/$SECTION/fail/${PACKAGE}_* $MASTER/$SECTION/bugged/${PACKAGE}_* $MASTER/$SECTION/pass/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f7)
+				LATEST=$(ls -tr1 --color=none fail/${PACKAGE}_* bugged/${PACKAGE}_* pass/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f1)
 				if [ "${problem%_error.conf}_error.conf" = "$problem" ] ; then 
-					LATESTFAIL=$(ls -tr1 --color=none $MASTER/$SECTION/fail/${PACKAGE}_* $MASTER/$SECTION/bugged/${PACKAGE}_*  2>/dev/null|tail -1|cut -d "/" -f7-8)
+					LATESTFAIL=$(ls -tr1 --color=none fail/${PACKAGE}_* bugged/${PACKAGE}_*  2>/dev/null|tail -1)
 					if [ "$LATEST" != "pass" ] && [ "$LATESTFAIL" = "$LOG" ] ; then 
 						echo "<li><a href='/$SECTION/$LOG'>$LOG</a> (<a href=\"http://bugs.debian.org/$PACKAGE?dist=unstable\" target=\"_blank\">BTS</a>)</li>" >> $OUTPUT
 						echo "$LOG" >> ${KNOWNLOGS[$NR]}
@@ -69,7 +69,7 @@ for SECTION in $SECTIONS ; do
 					fi
 				else
 					# this is an issue, not an error
-					LATESTSUCCESS=$(ls -tr1 --color=none $MASTER/$SECTION/pass/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f7-8)
+					LATESTSUCCESS=$(ls -tr1 --color=none pass/${PACKAGE}_* 2>/dev/null|tail -1)
 					if [ "$LATEST" = "pass" ] && [ "$LATESTSUCCESS" = "$LOG" ] ; then 
 						echo "<li><a href='/$SECTION/$LOG'>$LOG</a> (<a href=\"http://bugs.debian.org/$PACKAGE?dist=unstable\" target=\"_blank\">BTS</a>)</li>" >> $OUTPUT
 						echo "$LOG" >> ${KNOWNLOGS[$NR]}
@@ -108,8 +108,8 @@ for SECTION in $SECTIONS ; do
 		echo "<ul>" >> $OUTPUT
 		for LOG in $(cat $UNKNOWNLOGS|sort) ; do
 			PACKAGE=$(echo $LOG | cut -d "_" -f1|cut -d "/" -f2)
-			LATEST=$(ls -tr1 --color=none $MASTER/$SECTION/fail/${PACKAGE}_* $MASTER/$SECTION/bugged/${PACKAGE}_* $MASTER/$SECTION/pass/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f7)
-			LATESTFAIL=$(ls -tr1 --color=none $MASTER/$SECTION/fail/${PACKAGE}_* $MASTER/$SECTION/bugged/${PACKAGE}_*  2>/dev/null|tail -1|cut -d "/" -f7-8)
+			LATEST=$(ls -tr1 --color=none fail/${PACKAGE}_* bugged/${PACKAGE}_* pass/${PACKAGE}_* 2>/dev/null|tail -1|cut -d "/" -f1)
+			LATESTFAIL=$(ls -tr1 --color=none fail/${PACKAGE}_* bugged/${PACKAGE}_*  2>/dev/null|tail -1)
 			if [ "$LATEST" != "pass" ] && [ "$LATESTFAIL" = "$LOG" ] ; then 
 				echo "<li><a href='/$SECTION/$LOG'>$LOG</a> (<a href=\"http://bugs.debian.org/$PACKAGE?dist=unstable\" target=\"_blank\">BTS</a>)</li>" >> $OUTPUT
 				COUNT=$((COUNT+1))

-- 
piatti.debian.org configuration files



More information about the Piuparts-commits mailing list