On 05/12/2018 07:17 AM, Allan McRae wrote: > On 03/05/18 11:32, Eli Schwartz wrote: >> This is a common URI scheme (in general if not in makepg) and we should >> provide a handler for it. We already allow its use for locally sourced >> git repositories, so it makes sense to not leave files out. >> >> Signed-off-by: Eli Schwartz <[email protected]> --- >> etc/makepkg.conf.in | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in >> index fe3858ad..4d6ab78d 100644 >> --- a/etc/makepkg.conf.in >> +++ b/etc/makepkg.conf.in >> @@ -8,7 +8,8 @@ >> # >> #-- The download utilities that makepkg should use to acquire sources >> # Format: 'protocol::agent' >> -DLAGENTS=('ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 >> -o %o %u' >> +DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u' > > why not use "cp"?
1) no need to strip the file:/// bit by special-casing file:// like we do scp. Why make file:// filesystem-aware in ways that nothing else is anyway? 2) cp preserves attributes like the executable bit, which http urls specifically don't; cp is therefore inconsistent. 3) cp is silent, which would make it the only DLAGENTS which is by default silent. 4) it's thematically consistent with using the same thing lots of times. I guess we could use /usr/bin/cp --no-preserve=mode -v But this still leaves special-casing file:// which IMHO introduces slightly magic behavior and I don't like using something other than the actual contents of the source=() except as explicitly documented in the PKGBUILD(5) manpage for :: and + -- Eli Schwartz Bug Wrangler and Trusted User
signature.asc
Description: OpenPGP digital signature
