From 9d55d8511243193d936e9b1ed07d3f9ad20d189d Mon Sep 17 00:00:00 2001 From: Thomas Pegg Date: Fri, 12 Mar 2010 03:46:12 +0000 Subject: [PATCH] Enhance messages produced by jhalfs when files do not exist in either /sources or SRC_ARCHIVE, also in cases when SRC_ARCHIVE is not set. Thanks to Tim Sarbin for the patch. --- common/libs/func_download_pkgs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/libs/func_download_pkgs b/common/libs/func_download_pkgs index 5dd523e..4e7cb0c 100644 --- a/common/libs/func_download_pkgs +++ b/common/libs/func_download_pkgs @@ -71,14 +71,20 @@ get_sources() { # Download file, write name to MISSING_FILES.DMP if echo "$FILE: -- copied from $SRC_ARCHIVE" fromARCHIVE=1 else - echo "${BOLD}${YELLOW}$FILE: not found in ${SRC_ARCHIVE}${OFF}" fromARCHIVE=0 # If the file does not exist yet in /sources download a fresh one if [ ! -f $FILE ] ; then + if [[ ! ("$SRC_ARCHIVE" = "") ]] ; then + echo "${BOLD}${YELLOW}$FILE: not found in ${SRC_ARCHIVE} or /sources${OFF}" + else + echo "${BOLD}${YELLOW}$FILE: not found in /sources${OFF}" + fi if ! wget $URL1 $WGETPARAM && ! wget $URL2 $WGETPARAM ; then gs_wrt_message "$FILE not found in the SRC_ARCHIVE or on any server..SKIPPING" continue fi + else + echo "${BOLD}${YELLOW}$FILE: using cached file in /sources${OFF}" fi fi