[OpenWrt-Devel] A note on selects vs. DEPENDS
openwrt at daniel.thecshore.com
Tue Dec 22 18:42:42 EST 2015
On 22/12/15 09:03 AM, Felix Fietkau wrote:
> 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
It's actually used in the context of a Package/<pkg>/config section that
does some condition compilation option that when enabled adds another
dependency. Hence the unusual method. Conditional dependency based on
the configure option I had forgotten as an option though:
bool "Enable JSON output"
and in depends
That sound right?
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel