[Buildroot] [PATCH] pkg-download: make package name optional in github helper

Arnout Vandecappelle arnout at mind.be
Thu Oct 5 17:50:14 UTC 2017



On 05-10-17 12:13, Ismael Luceno wrote:
> On 04/Oct/2017 18:35, Arnout Vandecappelle wrote:
> <...>
>>  The solution (probably) is to use $(PKG) instead of $(pkgname).
> 
> I see.
> 
>>> +# github(user[,package[,version]]): returns site of GitHub repository
>>> +github = https://github.com/$(1)/$(or $(2),$(pkgname))/archive/$(or $(3),$($(call UPPERCASE,$(pkgname))_VERSION))
>>
>>  Could you estimate how many packages could be simplified with this?
> 
> A great deal, including axel, in 219 out of 380 the repo matches the
> package name, with 30 also matching the username.

 Hm, not convincing enough for me. It saves just a tiny little bit of typing, it
does not make things more readable, and it adds complexity to the github macro
itself. No, I don't think it's worth it.


>> I'm not actually sure this is a good idea anyway. The _VERSION is OK
>> because it works for *all* packages, the third argument is only needed
>> when you use the github helper outside a package (e.g. for a custom
>> kernel URL). But this change will apply only to a limited number of
>> packages on the one hand, and on the other hand it makes it even more
>> difficult for people to understand what is meant with this $(call
>> github,foo) construct.
> 
> It's "magic" anyway. It would perhaps make sense to implement this kind
> of rules via rewriting AXEL_SITE, it could be something descriptive like:
> 
> 	AXEL_SITE = @ github user:axel-download-accelerator repo:libtls
> 
> Here's a mockup: http://tmp.iodev.co.uk/rtest.mk

 Here also I don't think the added complexity in the implementation is worth it.
It is indeed a bit more explicit, but now you have to remember that the
arguments are called user: and repo:. For me,
$(call github,axel-download-accelerator,libtls) is an easy-to-remember way to
refer to https://github.com/axel-download-accelerator/libtls.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF


More information about the buildroot mailing list