summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-01-15 23:03:51 -0600
committerDan McGee <dan@archlinux.org>2008-01-20 12:32:37 -0600
commit003adb7646c6e7d00b6cac26586aa3678ade660b (patch)
treecec4f7c2d11536785401569d7a3488f8bf34eb5c /scripts
parent3b464dc89774ea83d4fe4c837b751d4ecc637e43 (diff)
downloadpacman-003adb7646c6e7d00b6cac26586aa3678ade660b.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in6
1 files changed, 6 insertions, 0 deletions
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 $?