[Toybox] ?from left field

scsijon scsijon at lamiaworks.com.au
Tue Oct 21 03:06:03 PDT 2014


On 10/21/2014 02:52 PM, Isaac Dunham wrote:
> On Mon, Oct 20, 2014 at 11:47:32AM -0500, Rob Landley wrote:
>> On 10/20/14 01:50, Isaac Dunham wrote:
>>> On Mon, Oct 20, 2014 at 01:17:44PM +1100, scsijon wrote:
>>>> I was wondering if toybox 'could / would be able to' have an auto tool built
>>>> into it. I'm not a coder, so can't do it, but....
>>>>
>>>> Along the line of:
>>>> --
>>>> If toybox had the command 'siliswap' built into it, but it's inbuilt
>>>> siliswap was a subset of the full 'siliswap' command and it's complete set
>>>> of switches, as for most people and programs it doesn't need the others.
>>>>
>>>> If at a later stage, the user needs to install the full 'siliswap' package
>>>> because they need to use switches that are not built into toybox's
>>>> 'siliswap' then toybox's 'siliswap' knows to pass the request onto the full
>>>> siliswap instead of dealing with it itself.
>>>> --
>>>> Not sure if it could be added without a shell file though and i'd prefer not
>>>> to add to the default set. ?or could these be created automatically when
>>>> toybox is first run, against all inbuilt packages, or manually with a toybox
>>>> -cfg command).
>>>>
>>>> And of course, toybox doesn't have or needs siliswap (it's a very old IBM
>>>> Mainframe silo interface command), i'm not sure it is even used anymore.
>>>
>>>
>>> 1. Rob keeps talking about simplicity...this doesn't sound very simple.
>>> It also doesn't sound small--which defeats the point of implementing a
>>> subset.
>>
>> A lot of simplicity is how you look at the problem. :)
>>
>> In this case, xexec() tries the builtin version, then falls back to
>> exec. If you add a path to your command, it never tries the builtin
>> version. So "/bin/echo" will always try to exec. That's the current
>> behavior.
>
>> When execing, the symlinks can be replaced after the fact. Even if
>> "echo" is built into toybox, if /bin/echo isn't a symlink pointing to
>> toybox then running it will run something else. You can delete the old
>> symlink and replace it with whatever you want to add to the system.
>> (This flexibility is intentional, and again is the current behavior.)
>
> I understood the request somewhat differently, partly due to some
> discussions on the Puppy Linux forums (where scsijon is also a member).
> (I may have misunderstood, though.)
>
> Puppy Linux provides both full and Busybox versions of many commands,
> with a "wrapper" script that will call either the full or the Busybox
> version, depending on the arguments.
> The *theory* is that it speeds things up if you only need Busybox.
> (In practice, it slows everything down.)
> I'd read scsijon's request as asking for something rather like that,
> so that (a) toybox handles a call by default, and (b) any options we
> can't handle get passed to "the full version".
>
> Rereading it, I get the impression that he's asking for "prefer external
> but fall back to applets if that fails"; but maybe you're reading it right.
>
>
> Thanks,
> Isaac Dunham
>
What I think I'm considering is basically (b), that if the full command 
has been installed, it will be used for 'switches that toybox can't 
handle, allowing that the output structure 'may' be different to 
toybox's or busybox's; (shouldn't happen but...). If the full package 
has not been installed toybox's version of the command will be tried 
first when toybox is installed, otherwise it will try to use busybox's 
version (of course that has to be installed) if the command is not in 
toybox, OR as a failsafe it ERRORS to tell the user they need the full 
package or the switch 'is missing or wrong' (typo's come to mind).

I don't like wrapper scripts, personally I'd like to loose them all 
where/if I could from our puppies, but I'm just one builder.

With Rob being flexible and  properly controlling what was happening 
inside toybox, I thought there may be a way to do it simply/easily for 
all inbuilt commands for toybox. And as a side, it also may cause other 
linux's to consider having toybox in their set even for just this one 
feature.

I did say when I started this discussion, that i'd prefer not to add to 
the default set. I had hoped it could be handled internally and simply 
for all toybox commands. I also said I'm not a coder! and so was putting 
up what I considered a possibly useful thought path, not a solution, 
which is why I labeled it ?from left field.

I also intend to add toybox into my T2 V9.0 (trunk) Puppy Linux called 
Puppy T290 as I expand it through alpha's, as I have always since first 
coming across it through aboriginal, consider it a magnificant and 
worthwhile addition to linux, (no swollen heads please).

And greetings Isaac, you are right, we Puppians have had quite a 
'robust' discussion over the years, since BarryK started Puppy Linux, 
about the use of full and partial command sets using wrappers, it's 
still not agreed to in either way, and I suspect it will never be.

I also remember the discussions we had back when SuSE origonally 
announced the first 'public users conferance in Australia', as we had a 
stream at one of the conferances that ended just dealing with this one 
topic across all 3 days and evenings, with no agreed ending (or dealing 
with any of ther other topics the stream was suppose to cover either).

however, for now,
regards to all
jon

 1413885963.0


More information about the Toybox mailing list