diff options
author | Anatol Pomozov <anatol.pomozov@gmail.com> | 2020-04-19 11:12:01 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-06-26 07:59:08 +0200 |
commit | 16d98d657748fdbf32ab24db56d3cd4a23447673 (patch) | |
tree | ee8398b06af9c96afa68fd8d6ac3aeb6d712c6f6 /lib/libalpm/dload.h | |
parent | 59e751f72d09390067045168ac45a09a89419389 (diff) | |
download | pacman-16d98d657748fdbf32ab24db56d3cd4a23447673.tar.gz pacman-16d98d657748fdbf32ab24db56d3cd4a23447673.tar.xz |
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 <anatol.pomozov@gmail.com>
Diffstat (limited to 'lib/libalpm/dload.h')
-rw-r--r-- | lib/libalpm/dload.h | 5 |
1 files changed, 5 insertions, 0 deletions
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; |