From 16d98d657748fdbf32ab24db56d3cd4a23447673 Mon Sep 17 00:00:00 2001 From: Anatol Pomozov Date: Sun, 19 Apr 2020 02:12:01 -0700 Subject: Convert '-U pkg1 pkg2' codepath to parallel download Installing remote packages using its URL is an interesting case for ALPM API. Unlike package sync ('pacman -S pkg1 pkg2') '-U' does not deal with server mirror list. Thus _alpm_multi_download() should be able to handle file download for payloads that either have 'fileurl' field or pair of fields ('servers' and 'filepath') set. Signature for alpm_fetch_pkgurl() has changed and it accepts an output list that is populated with filepaths to fetched packages. Signed-off-by: Anatol Pomozov --- lib/libalpm/dload.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/libalpm/dload.h') diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h index 1e4af755..b9ef9c99 100644 --- a/lib/libalpm/dload.h +++ b/lib/libalpm/dload.h @@ -30,6 +30,11 @@ struct dload_payload { char *tempfile_name; char *destfile_name; char *content_disp_name; + /* client has to provide either + * 1) fileurl - full URL to the file + * 2) pair of (servers, filepath), in this case ALPM iterates over the + * server list and tries to download "$server/$filepath" + */ char *fileurl; char *filepath; /* download URL path */ alpm_list_t *servers; -- cgit v1.2.3-24-g4f1b