From 349c22d043290ccd0cce9f30981f5415e295442a Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 25 Nov 2019 19:07:56 -0500 Subject: makepkg: fix regression that broke extraction of file:// sources In commit 9c817b654996249b8022e189ee7e2692f4668431 we made these sources extendable, and heuristically determined the correct extraction functions to use. But our fallback for protos that didn't have an exact extract_* function didn't take into account that 'extract_file' matches an actual proto... so we passed the netfile in while the function expected a file. Solution: the function should expect a netfile too, thereby allowing us to delay an attempted resolution of netfile -> file, to the one case where it is actually used. This makes us slightly more efficient in the non-file case, makes our functions a bit more consistent, and makes file:// extraction work again. Fixes FS#64648 Signed-off-by: Eli Schwartz Signed-off-by: Allan McRae --- scripts/libmakepkg/source/file.sh.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/libmakepkg/source') diff --git a/scripts/libmakepkg/source/file.sh.in b/scripts/libmakepkg/source/file.sh.in index 7297a1c6..df4256f7 100644 --- a/scripts/libmakepkg/source/file.sh.in +++ b/scripts/libmakepkg/source/file.sh.in @@ -83,8 +83,9 @@ download_file() { } extract_file() { - local file=$1 + local netfile=$1 + local file=$(get_filename "$netfile") local filepath=$(get_filepath "$file") rm -f "$srcdir/${file}" ln -s "$filepath" "$srcdir/" -- cgit v1.2.3-24-g4f1b