[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-827-g219614b

Andreas Beckmann debian at abeckmann.de
Wed Jun 20 23:15:11 UTC 2012


The following commit has been merged in the piatti branch:
commit 2dce52d22ee72d739b06ad1a651c1a38cc21b3c8
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Wed Jun 20 20:03:08 2012 +0200

    bin/*: skip section if $MASTER/$SECTION directory is missing
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/home/piupartsm/bin/archive_old_logs b/home/piupartsm/bin/archive_old_logs
index d361f1e..a3afa87 100755
--- a/home/piupartsm/bin/archive_old_logs
+++ b/home/piupartsm/bin/archive_old_logs
@@ -43,7 +43,9 @@ get_config_value SECTIONS global sections
 #
 # archive old log files
 #
+OLDPWD=$(pwd)
 for SECTION in $SECTIONS ; do
+	test -d $MASTER/$SECTION || continue
 	mkdir -p $MASTER/$SECTION/archive
 	cd $MASTER/$SECTION
 	mkdir -p archive/pass archive/bugged archive/affected archive/fail
@@ -69,5 +71,6 @@ for SECTION in $SECTIONS ; do
 		echo
 	fi
 	mv archive/stamp.new archive/stamp
+	cd "$OLDPWD"
 done
 
diff --git a/home/piupartsm/bin/detect_archive_issues b/home/piupartsm/bin/detect_archive_issues
index 1ed60fa..af554e4 100755
--- a/home/piupartsm/bin/detect_archive_issues
+++ b/home/piupartsm/bin/detect_archive_issues
@@ -50,6 +50,7 @@ get_config_value DAYS global reschedule-untestable-days 7
 LOGS=`mktemp`
 URLS=`mktemp`
 for SECTION in $SECTIONS ; do
+	test -d $MASTER/$SECTION || continue
 	mkdir -p $MASTER/$SECTION/fail/ $MASTER/$SECTION/untestable/
 	find $MASTER/$SECTION/fail -name '*.log' -mtime +1 | xargs -r \
 		grep -l -E "E: Broken packages|E: Unable to correct problems, you have held broken packages|E: Error, pkgProblemResolver::Resolve generated breaks" 2>/dev/null > $LOGS
diff --git a/home/piupartsm/bin/detect_network_issues b/home/piupartsm/bin/detect_network_issues
index b8f61c2..70507e3 100755
--- a/home/piupartsm/bin/detect_network_issues
+++ b/home/piupartsm/bin/detect_network_issues
@@ -46,6 +46,7 @@ get_config_value SECTIONS global sections
 
 FILE=`mktemp`
 for SECTION in $SECTIONS ; do
+	test -d $MASTER/$SECTION || continue
 	for subdir in fail bugged affected ; do
 		rgrep -l "Cannot initiate the connection to" $MASTER/$SECTION/$subdir >> $FILE
 		rgrep -l "Hash Sum mismatch" $MASTER/$SECTION/$subdir >> $FILE
diff --git a/home/piupartsm/bin/detect_piuparts_issues b/home/piupartsm/bin/detect_piuparts_issues
index af89b3f..a4c15ec 100755
--- a/home/piupartsm/bin/detect_piuparts_issues
+++ b/home/piupartsm/bin/detect_piuparts_issues
@@ -46,6 +46,7 @@ get_config_value SECTIONS global sections
 
 FILE=`mktemp`
 for SECTION in $SECTIONS ; do
+	test -d $MASTER/$SECTION || continue
 	for subdir in fail bugged affected ; do
 		rgrep -l -E "tar( \(child\))?: .*.tar.gz: Cannot open: No such file or directory" $MASTER/$SECTION/$subdir >> $FILE
 		rgrep -l -e "tar: .*: No space left on device" $MASTER/$SECTION/$subdir >> $FILE
diff --git a/home/piupartsm/bin/generate_daily_report b/home/piupartsm/bin/generate_daily_report
index 4cd0eec..f556e73 100755
--- a/home/piupartsm/bin/generate_daily_report
+++ b/home/piupartsm/bin/generate_daily_report
@@ -78,6 +78,7 @@ touch $FAILURESTAMP.new  # for the next report
 
 echo "New failures:" >> $DAILYREPORT
 for SECTION in $SECTIONS ; do
+	test -d $MASTER/$SECTION || continue
 	find $MASTER/$SECTION/fail $MASTER/$SECTION/bugged $MASTER/$SECTION/affected $MASTER/$SECTION/untestable \
 		-type f -name '*.log' -newer $FAILURESTAMP -exec ls -1 {} + 2>/dev/null
 done | sed s#^$MASTER#$URLBASE# >> $DAILYREPORT
diff --git a/home/piupartsm/bin/report_newly_bugged_packages b/home/piupartsm/bin/report_newly_bugged_packages
index a68ee04..57c76b9 100755
--- a/home/piupartsm/bin/report_newly_bugged_packages
+++ b/home/piupartsm/bin/report_newly_bugged_packages
@@ -47,7 +47,7 @@ export PYTHONPATH=$PIUPARTS_PREFIX/lib/python2.6/dist-packages:$PIUPARTS_PREFIX/
 OLDPWD=$(pwd)
 OUTPUT=$(mktemp)
 for SECTION in $SECTIONS ; do
-	if [ -d $MASTER/$SECTION ]; then
+	test -d $MASTER/$SECTION || continue
 		cd $MASTER/$SECTION
 		$PIUPARTS_PREFIX/share/piuparts/piuparts-analyze 2>&1 > $OUTPUT
 		if [ -s $OUTPUT ]; then
@@ -56,6 +56,5 @@ for SECTION in $SECTIONS ; do
 			echo
 		fi
 		cd "$OLDPWD"
-	fi
 done
 rm $OUTPUT
diff --git a/home/piupartsm/bin/report_stale_reserved_packages b/home/piupartsm/bin/report_stale_reserved_packages
index ecbfcb9..0a1eaad 100755
--- a/home/piupartsm/bin/report_stale_reserved_packages
+++ b/home/piupartsm/bin/report_stale_reserved_packages
@@ -47,6 +47,7 @@ get_config_value SECTIONS global sections
 DAYS=2
 LOGS=`mktemp`
 for SECTION in $SECTIONS ; do
+	test -d $MASTER/$SECTION || continue
 	find $MASTER/$SECTION/reserved/ -mtime +$DAYS -name "*.log" 2>/dev/null >> $LOGS
 done
 if [ -s $LOGS ] ; then
diff --git a/home/piupartsm/bin/report_untestable_packages b/home/piupartsm/bin/report_untestable_packages
index 0a1b072..e903cb6 100755
--- a/home/piupartsm/bin/report_untestable_packages
+++ b/home/piupartsm/bin/report_untestable_packages
@@ -47,6 +47,7 @@ get_config_value DAYS global reschedule-untestable-days 7
 
 LOGS=`mktemp`
 for SECTION in $SECTIONS ; do
+	test -d $MASTER/$SECTION || continue
 	find $MASTER/$SECTION/untestable/ -mtime +$DAYS -name "*.log" 2>/dev/null >> $LOGS
 done
 if [ -s $LOGS ] ; then
diff --git a/home/piupartsm/bin/reschedule_oldest_logs b/home/piupartsm/bin/reschedule_oldest_logs
index f3c163a..fb41b35 100755
--- a/home/piupartsm/bin/reschedule_oldest_logs
+++ b/home/piupartsm/bin/reschedule_oldest_logs
@@ -52,6 +52,7 @@ TOTAL=0
 LOGS=`mktemp`
 OLDPWD=$(pwd)
 for SECTION in $SECTIONS ; do
+	test -d $MASTER/$SECTION || continue
 	get_config_value RESCHEDULE $SECTION auto-reschedule yes
 	if [ "$RESCHEDULE" = "yes" ]; then
 		get_config_value _AGE        $SECTION reschedule-old-days $AGE

-- 
piuparts git repository



More information about the Piuparts-commits mailing list