[Collab-qa-commits] r1620 - udd/scripts

Andreas Tille tille at alioth.debian.org
Wed Nov 4 21:35:23 UTC 2009


Author: tille
Date: 2009-11-04 21:35:23 +0000 (Wed, 04 Nov 2009)
New Revision: 1620

Modified:
   udd/scripts/fetch_ddtp_translations.sh
Log:
Make sure UDD will not be updated with non existant DDTP data by returning error code if download failed


Modified: udd/scripts/fetch_ddtp_translations.sh
===================================================================
--- udd/scripts/fetch_ddtp_translations.sh	2009-11-04 08:27:51 UTC (rev 1619)
+++ udd/scripts/fetch_ddtp_translations.sh	2009-11-04 21:35:23 UTC (rev 1620)
@@ -15,6 +15,13 @@
     rm -rf "$TARGETDIR"
     [ -d $TARGETDIR ] || mkdir -p $TARGETDIR
     `dirname $0`/getlinks.pl "$HTTPMIRROR"/dists/${rel}/main/i18n/ "$TARGETPATH"/${rel} 'Translation-.*\.gz$'
+    # getlinks.pl always returns 0 independently from success so we have to verify that the target dir is
+    # not empty.
+    NUMFILES=`ls "$TARGETPATH"/${rel} | wc -l`
+    if [ $NUMFILES -le 0 ] ; then
+	echo "Downloading translation for release ${rel} failed. Stopped."
+	exit 66
+    fi
     ## The rsync-able Translations do not (yet) contain package version info
     ## This might happen later but it requires deeper changes in several tools
     ## including apt - so we have to download via http from ddtp directly which




More information about the Collab-qa-commits mailing list