[Buildroot] [PATCH] core/legal-info: allow ignoring packages from the legal-info

Luca Ceresoli luca at lucaceresoli.net
Mon Oct 17 08:22:23 UTC 2016


Hi Yann, Arnout,

On 15/10/2016 22:13, Yann E. MORIN wrote:
[...]
>>>>  One remark though: I think the pre- and post-hooks should still run even if
>>>> _GEN_LEGAL_INFO = NO.
>>> Not so sure... Such hooks are made to save extra stuff into legal-info,
>>> or to prepare the package for legal-info. So, if the package is excluded
>>> for legal-info, there is no reason to run those hooks to start with, is
>>> there?
>>  First of all, both _GEN_LEGAL_INFO and _LEGAL_INFO_HOOKS are package-specific
>> so the package knows what it's doing.
>>
>>  The reason to run hooks is that you may still want to do *something* in the
>> legal info for excluded packages. I can't give a concrete example, but I'm
>> thinking along the lines of e.g. doing some check and erroring out, or still
>> adding some custom information to legal info. You know, what the hooks are meant
>> for in the first place :-) The point is, this option disables the normal
>> legal-info, but that doesn't mean that there would be no legal-info at all.
> 
> I would argue that, if a packager elected to have its package completely
> ignored by the legal-info infra, we should just abide by this wish and
> just completely ignore it. Altogether.
> 
> Let's see what others think... ;-)

I think Arnout is right. The hooks would allow to implement any weird
behavior that the infra is not (and should not even be) flexible enough
to do. Of course this would be doable with a user-provided script, but
then the script should also detect whether the given package is enabled
or not, while the hooks do it for free.

As far as the code is concerned, it should be only a matter of moving
the if/endif a few lines below/above, so it shouldn't add complexity.

-- 
Luca



More information about the buildroot mailing list