[Debian-l10n-commits] r2739 - in /ddtp-web: Changelog Packages2packages_tb.sh

nekral-guest at users.alioth.debian.org nekral-guest at users.alioth.debian.org
Thu Jul 28 23:24:41 UTC 2011


Author: nekral-guest
Date: Thu Jul 28 23:24:41 2011
New Revision: 2739

URL: http://svn.debian.org/wsvn/?sc=1&rev=2739
Log:
	* Packages2packages_tb.sh: After failure to download, do not
	indicate success to download.
	* Packages2packages_tb.sh: Harmonize logs with a date prefix

Modified:
    ddtp-web/Changelog
    ddtp-web/Packages2packages_tb.sh

Modified: ddtp-web/Changelog
URL: http://svn.debian.org/wsvn/ddtp-web/Changelog?rev=2739&op=diff
==============================================================================
--- ddtp-web/Changelog (original)
+++ ddtp-web/Changelog Thu Jul 28 23:24:41 2011
@@ -1,3 +1,9 @@
+2011-07-28  Nicolas Francois  <nicolas.francois at centraliens.net>
+
+	* Packages2packages_tb.sh: After failure to download, do not
+	indicate success to download.
+	* Packages2packages_tb.sh: Harmonize logs with a date prefix
+
 2011-07-28  Nicolas Francois  <nicolas.francois at centraliens.net>
 
 	* ddts-stats: Ignore HTTP code 200 and 500.

Modified: ddtp-web/Packages2packages_tb.sh
URL: http://svn.debian.org/wsvn/ddtp-web/Packages2packages_tb.sh?rev=2739&op=diff
==============================================================================
--- ddtp-web/Packages2packages_tb.sh (original)
+++ ddtp-web/Packages2packages_tb.sh Thu Jul 28 23:24:41 2011
@@ -19,9 +19,13 @@
 
 			echo `date`: ${distribution}/${part}/$arch
 			[ -s $file.bz2 ] && mv $file.bz2 Packages/Packages.bz2
-			wget -P Packages -q -m -nd http://ftp.de.debian.org/debian/dists/${distribution}/${part}/binary-$arch/Packages.bz2 || echo `date`: "Failed to download ${distribution}/${part}/$arch" 1>&2
+			wget -P Packages -q -m -nd \
+			    http://ftp.de.debian.org/debian/dists/${distribution}/${part}/binary-$arch/Packages.bz2 && {
+				echo `date`: Packages file downloaded
+			} || {
+				echo `date`: Failed to download ${distribution}/${part}/$arch 1>&2
+			}
 			[ -s Packages/Packages.bz2 ] && mv Packages/Packages.bz2 $file.bz2
-			echo `date`: Packages file downloaded
 		done
 	done
 done
@@ -31,23 +35,26 @@
 	for part in $PART
 	do
 		# Clear active before loading sid (which is what counts as active)
+		echo -n "`date`: packages_tb "
 		psql ddtp -c "TRUNCATE packages_tb"
 
 		for arch in $DISTS
 		do
 			file="Packages/Packages_${distribution}_${part}_${arch}.bz2"
 
-			[ -f $file ] && echo -n `date` : $file
+			[ -f $file ] && echo -n `date`: $file
 			[ -f $file ] && bzcat $file | $INPORT2DB
 			[ -f $file ] || echo no $file
 		done
 
 		file="Packages/Packages_${distribution}_${part}"
+		echo -n "`date`: "
 		$DB2FILE $file
 		rm -f $file.bz2
 		bzip2 $file
 	done
 done
 # Regular vacuum to cut disk usage
+echo -n "`date`: "
 psql ddtp -c "VACUUM"
 




More information about the Debian-l10n-commits mailing list