[PATCH 1/3] Support both custom scripts and scripted applets

Ron Yorston rmy at pobox.com
Sat Nov 17 10:31:00 UTC 2018


Denys Vlasenko wrote:
>How about this? - embed/ applets can have configuration.
>If it exists, then they are visible in "make menuconfig"
>and can be selected or deselected.
>But if config is _absent_, they are included unconditionally.
>
>This seems to cover both cases.

So we have two types of script, those with and without configuration,
but they all reside in the 'embed' directory?

That seems to increase complexity at build-time without any change in
complexity at run-time.  And having all the scripts in the same place
reduces the distinction between them (at build-time).

>If you are ok with this, willing to cook a patch?

I'm not really OK with it, for the above reasons, but I can have a go
at making a patch anyway, just to see how horrible it looks ;-)

>From your previous comments:
>I propose to treat both of these types scripts the same way.
>I have a feeling this will result in simpler code.

I got the impression that your concern was the complexity of the run-time
code.  One way to reduce this is to treat custom scripts as if they
were applets.  This could be achieved by generating fake applet data
for them at build-time.  (Though, again, this will increase complexity
at build-time.)

The run-time code would then handle all embedded scripts as applets,
thus requiring only one code path.

The downside is that the end user would see all embedded scripts as
applets.  There would be no distinction between BusyBox-supplied
scripted applets and custom scripts.

Maybe I'll make a patch for that too.

I still think the *approach* of the current patch best serves all parties:
BusyBox developers, custom script developers and end users.

The *implementation* may, of course, be subject to improvement.

Ron


More information about the busybox mailing list