1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-21 23:38:49 -05:00

makepkg: Output full URL in case of download failure

Most entries in $sources contain variables so finding out why a URL
fails to download is hard because one has to manually replace the
variables when looking at the PKGBUILD. Simply output the full URL here
so that it can be easily seen what is wrong.

Old:
==> ERROR: Failure while downloading example-1.2.4.tar.gz

New:
==> ERROR: Failure while downloading http://example.org/releases/1.1/example-1.2.4.tar.gz

With the new format it is much more obvious that the directory name is
the culprint (1.1 vs 1.2) while the old one would not display that
information.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Florian Pritz 2015-12-14 16:52:35 +01:00 committed by Allan McRae
parent eadf389607
commit a671fa497c

View File

@ -71,7 +71,7 @@ download_file() {
if ! command -- "${cmdline[@]}" >&2; then
[[ ! -s $dlfile ]] && rm -f -- "$dlfile"
error "$(gettext "Failure while downloading %s")" "$filename"
error "$(gettext "Failure while downloading %s")" "$url"
plain "$(gettext "Aborting...")"
exit 1
fi