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

Felix Fietkau nbd at openwrt.org
Tue Dec 22 09:03:27 EST 2015

On 2015-12-22 06:02, Daniel Dickinson wrote:
> 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).
You should just use the normal conditional depends syntax for the
DEPENDS line in the package, instead of duplicating it in Config.in and


- Felix
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list