> I wanted to use such "DEPENDS" type instead of "define (...)/config" block
> but unfortunately after converting "Kconfig selects" to equivalent "openwrt
> DEPENDS:", eg:
>
> DEPENDS:=+@!PACKAGE_swap-utils:BUSYBOX_CONFIG_MKSWAP
> +@!PACKAGE_swap-utils:BUSYBOX_CONFIG_SWAPONOFF
>
> I got this in opkg control file:
>
> Package: kmod-zram
> Version: 3.6.11-1
> Depends: kernel (=3.6.11-1-479d5850a6a04abbd6713ee6c4ef65ac), kmod-lib-lzo,
> kmod-zsmalloc, BUSYBOX_CONFIG_MKSWAP, BUSYBOX_CONFIG_SWAPONOFF,
>
> This doesn't look good, does it? So I tried to reverse this dependency to
> allow people using buildroot to have the possibility to optimize their
> builds and be able to select busybox applets instead of swap-utils package,
> and also leaving other people using prebuild images the possibility to
> install this kmod package through opkg with appropriate dependencies.
>
> Unfortunately with this:
>
> DEPENDS:=+@!BUSYBOX_CONFIG_MKSWAP:PACKAGE_swap-utils
> +@!BUSYBOX_CONFIG_SWAPONOFF:PACKAGE_swap-utils
>
> I got this in opkg control file:
>
> Package: kmod-zram
> Version: 3.6.11-1
> Depends: kernel (=3.6.11-1-479d5850a6a04abbd6713ee6c4ef65ac), kmod-lib-lzo,
> kmod-zsmalloc, PACKAGE_swap-utils, PACKAGE_swap-utils
>
> Which still doesn't look good.
>
> @devs: Is there any chance for patch to opkg system so it generates proper
> "Depends:" in such situations? I mean "swap-utils" instead of "
> PACKAGE_swap-utils" This would be useful I think. What do you think?

That's easy:
DEPENDS:=+!BUSYBOX_CONFIG_MKSWAP:swap-utils

the @ is only needed if you want to select a symbol. I have never
watched into a opkg control file, otherwise I would have seen that
busybox depends will not work. For compiling you own image it's fine.
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to