From 003adb7646c6e7d00b6cac26586aa3678ade660b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 15 Jan 2008 23:03:51 -0600 Subject: makepkg: add check to ensure we have non-URL files in build dir Pacman 3.0 printed the following message if a file could not be found: ERROR: xxx was not found in the build directory and is not a proper URL. We lost this logic in 3.1 when moving to the DLAGENT type stuff, so a not-found file got passed all the way to the download logic where it failed with a odd error message. Bring back some logic to ensure only files with URLs get past a certain point, and fail if the file is not available. Fixes FS#9208. Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 219e2d17..ad95356c 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -464,6 +464,12 @@ download_sources() { continue fi + # if we get here, check to make sure it was a URL, else fail + if [ "$file" = "$netfile" ]; then + error "$(gettext "%s was not found in the build directory and is not a URL.")" "$netfile" + exit 1 # $E_MISSING_FILE + fi + # find the client we should use for this URL local dlclient=$(get_downloadclient $netfile) || exit $? -- cgit v1.2.3-70-g09d2 From 73ee64d49f8703e2b732ae03771a63ef56208601 Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Sun, 20 Jan 2008 14:08:55 +0100 Subject: workaround for a gettext string starting with --. Workaround found in Advanced Bash-Scripting Guide, localization section. "added a \0 (NULL) at the beginning of the sentence." Signed-off-by: Chantry Xavier --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index ad95356c..998e240c 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1187,7 +1187,7 @@ done if [ "$HOLDVER" = "1" -a "$FORCE_VER" != "" ]; then # The extra '--' is here to prevent gettext from thinking --holdver is # an option - error "$(gettext -- "--holdver and --forcever cannot both be specified")" + error "$(gettext "\\0--holdver and --forcever cannot both be specified" )" exit 1 fi -- cgit v1.2.3-70-g09d2