[pacman-dev] [PATCH] makepkg.conf: add default protocol handler for file:// urls.

Allan McRae allan at archlinux.org
Sun May 13 03:03:23 UTC 2018


On 13/05/18 12:53, Eli Schwartz wrote:
> 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 <eschwartz at archlinux.org> ---
>>>  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 +
> 

Good enough explanation for me.

A


More information about the pacman-dev mailing list