[LEDE-DEV] [PATCH] metadata: compile dependencies only when the package is selected

Yousong Zhou yszhou4tech at gmail.com
Wed Feb 28 02:48:03 PST 2018


On 28 February 2018 at 16:13, Felix Fietkau <nbd at nbd.name> wrote:
> On 2018-02-28 06:07, Yousong Zhou wrote:
>> This is intended to reduce build time for situations like the following
>> where python and python-six and their dependencies could still be built
>> as long as any subpackage within the srcpackage was selected regardless
>> of the selection state of openvswitch-python
>>
>>     define Package/openvswitch-python
>>       ...
>>       DEPENDS:=+python +python-six
>>     endef
>>
>> Previously we work around this by specifying the dependency as
>> +PACKAGE_openvswitch-python:python, which is unintuitive
>>
>> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
> The current behavior is intentional. The idea is that many packages
> currently do not use PKG_CONFIG_DEPENDS properly, or specify enable or
> disable of extra library support via configure arguments.
>
> This means that if the dependency depends on the package selection, we
> will get a lot of random package build failures depending on the build
> order.
>

Hi Felix, can you describe a concrete example where failure can
happen?  PKG_CONFIG_DEPENDS and the change here seems orthogonal to
each other.

Regards,
                yousong

> The idea behind this is if a package is known to handle this well, it
> can use the conditional dep syntax to indicate it.
>
> I agree that the syntax is not very intuitive, but I think it would be
> much better to add some syntactic sugar instead of adding more
> potentially hard to find build bugs.



More information about the Lede-dev mailing list