From e50cab3402e3a37a62f3d2b52b568318e9b9e3f9 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 19 Jan 2022 11:16:53 -0800 Subject: [PATCH] doc: Fail when downloading images from Debian wiki fails Fixes: #2173. When a wget process fails to download an image from Debian wiki for any reason, fail the whole fetching process so that the users notices it and reruns the process. Earlier, these were failing silently leading to zero sized images. Tests: - Without the change, notice that when wget process is killed during fetching of images, it leads to incorrect image files (partially downloaded or zero sized files). - With or without the changes, killing wget process at other times leads to fetch process halting indicating that wget in normal cases fails correctly. - With the change, killing the wget process will lead to an error and the fetching process stops. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- doc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Makefile b/doc/Makefile index 4e63015cb..147926ae4 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -85,7 +85,7 @@ $(fetch-main-list): fetch-main-%: fetch-cleanup-% xsltproc $(SCRIPTS_DIR)/fetch-images.xslt manual/$(lang)/freedombox-manual.raw.xml | \ sort -u | \ awk 'NF {print "wget --quiet -O manual/$(lang)/images/" $$1 " " $$2}' | \ - sh + sh -e rm manual/$(lang)/freedombox-manual.raw.xml fetch-pages-%: lang = $*