RFE: accept URLs for input files
In order to provide users with maximum power, apkg
commands should accept URLs as its input files (--archive
, --srcpkg
, ...) and automatically download files in question into appropriate location (pkg/remote
or pkg/downloads
).
This will allow for example single command package build directly from an arbitrary archive on the internet:
apkg build -b --upstream --archive https://secure.nic.cz/files/knot-resolver/knot-resolver-5.5.0.tar.xz
As multiple files with the same name can be downloaded from different URLs, the path needs to get a little ugly with a URL hash:
pkg/remote/de23ad/knot-resolver-5.5.0.tar.cz
This raises questions regarding caching:
- Should
apkg
cache downloaded files or (re-)download on each invocation? - Should it honor
--no-cache
which is disabled outside of VCS?
This should preferably be implemented after or alongside #73 (closed) cache refactor.