[OpenWrt-Devel] A note on selects vs. DEPENDS

Daniel Dickinson openwrt at daniel.thecshore.com
Tue Dec 22 00:02:27 EST 2015


Hi all,

I just discovered something.  It seems that in a package if you have a 
config section that does select PACKAGE_condition_dependency then the 
build succeeds but when you do opkg install, opkg does not 'know' about 
the dependency.

That means if you have a situation like lldpd where you have a 
conditional dependency it is not enough to add selects to same
config section as the conditional compilation flags, but you also need 
to add an EXTRA_DEPENDS:=$(if 
$(CONFIG_<conditional-compilation-flag>),conditional_dependency) line.

I will be submitting a patch to lldpd with that fix, since my previous 
patch fixed compilation, but doesn't solve the opkg problem (although no 
one is likely to actually run across it because libjson-c is installed 
by default so it's unlikely any failure would actually occur).  (Before 
my patch even compilation would fail if json output was disable due to 
missing dependency, now you would likely never notice the problem 
because libjson-c is installed by default, but I discovered the issue in 
reference to package to which I'm adding conditional build logic in the 
packages feed for which the conditional dependency is not included 
unless the package I'm working on depends on it).

Regards,

Daniel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list