[SCM] debian-live branch, master, updated. 1.0_a48-1-8-g2435bee
Chris Lamb
chris at chris-lamb.co.uk
Fri Jul 25 23:36:15 UTC 2008
The following commit has been merged in the master branch:
commit 2435bee4acd2dc3a7980b8ec67326dbb622fc2ff
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date: Sat Jul 26 00:27:29 2008 +0100
Fix cache poisoning issue in lh_binary_debian-installer with 404 downloads
When wget 404's, an target file is created - this poisons the cache as the
file is apparently downloaded but in actuality is simply empty. We fix this
by unconditionally deleting the cache file if wget fails and emitting an
error.
Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index 42412b0..b147b12 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -207,7 +207,13 @@ Download_file () {
if [ ! -f "${_LH_CACHE_FILE}" ]
then
mkdir -p ${_LH_CACHE_DIR}
- wget ${WGET_OPTIONS} -O "${_LH_CACHE_FILE}" "${_LH_URL}"
+ if ! wget ${WGET_OPTIONS} -O "${_LH_CACHE_FILE}" "${_LH_URL}"
+ then
+ rm -f "${_LH_CACHE_FILE}"
+
+ Echo_error "Could not download file: ${_LH_URL}"
+ exit 1
+ fi
fi
cp -fl "${_LH_CACHE_FILE}" "${_LH_TARGET}"
--
debian-live
More information about the debian-live-changes
mailing list