[LEDE-DEV] [PATCH] metadata: compile dependencies only when the package is selected
Felix Fietkau
nbd at nbd.name
Wed Feb 28 00:13:44 PST 2018
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.
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.
- Felix
More information about the Lede-dev
mailing list