On 4 January 2013 23:46, Stefan Hellermann <ste...@the2masters.de> wrote:

> > I think better dependency would be:
> >
> > define KernelPackage/zram/config
> >   select BUSYBOX_CONFIG_MKSWAP if !PACKAGE_swap-utils
> >   select BUSYBOX_CONFIG_SWAPONOFF if !PACKAGE_swap-utils
> > endef
> >
> >
> > btw.
> > @devs - is there an openwrt "DEPENDS:=" equivalent for "select <symbol>
> if
> > <expr>" ?
> >
>
> Yes there is:
> DEPENDS:=+@!PACKAGE_swap-utils:BUSYBOX_CONFIG_MKSWAP
>

Nice. Thanks for the hint Stefan!


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?


btw.
 shouldn't we move init script to some seperate userspace package and put
the dependencies there? zram doesn't need swap-utils ... what if one want
to use it for some other stuff. I know that init script is not much for a
seperate package... but...  is it a good idea to put some init script in
kernel module package?

btw2.
This also doesn't work:

*DEPENDS:=+@!BUSYBOX_CONFIG_MKSWAP:swap-utils
+@!BUSYBOX_CONFIG_SWAPONOFF:swap-utils*
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to