[LEDE-DEV] Need help with package dependencies
ardeleanalex at gmail.com
Wed Oct 19 10:12:36 PDT 2016
On Tue, Oct 18, 2016 at 2:09 PM, Zefir Kurtisi
<zefir.kurtisi at neratec.com> wrote:
> to those understanding the package dependency logic by heart, I'm trying to
> achieve something I assumed to be common, but fail to get there with the help of
> the available documentation.
> The short version is this:
> * package A has an optional feature X provided by package B
> * package B is optional (feeds package)
> => feature X should be selectable only if B is installed and selected
> * if feature X is activated, package A depends from package B
> I did:
> 1) in Config.in of package A add
> config WITH_FEATURE_X
> depends on PACKAGE_B
> prompt "Enable feature X"
> default n
> 2) in Makefile of package A add
> DEPENDS += +WITH_FEATURE_X:B
Why not just do DEPENDS+=+PACKAGE_B:B ?
This has the semantic that package A depends on B, only if it was
selected by some other package.
There are other depends like this PACKAGE_x around.
You could then drop WITH_FEATURE_X config option in A
If you need to add any other CFLAGS or LDFLAGS in A, you can just do
I hope I understood correctly what you want to do.
> With those changes, build fails due to recursive dependencies, because
> - symbol PACKAGE_B is selected by WITH_FEATURE_X
> - symbol WITH_FEATURE_X depends on PACKAGE_B
> If I leave out the additional line in Makefile of A and in menu select
> WITH_FEATURE_X, the build of A fails with missing dependency to package B.
> If I leave out the 'depends on PACKAGE_B' line in Config.in, I can select
> WITH_FEATURE_X without package B even being installed, which obviously fails building.
> Is this doable out of the box? What am I missing?
> BTW, this is about SNMP agentx support for lldpd.
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
More information about the Lede-dev