Denys,

your suggestion above for fixing tar to work with stdin is wonderful -
and I'm sure it will work.

But it illustrates the different world-views that you and I have. In an
illuminating way.

You think/speak as if busybox is infinitely mutable, and an issue can be
changed by improving it. I think of the busybox version I find on
existing computers as part of the fixed background, and am looking at
ways to work with any/all of them without changing them.

If I need to do something to my application, I would like it to work on

    the systems I have in the field running feature-lite busybox 0.60 
        ( Good Lord )
    the ATNGW-clones which run 1.13 non-desktop
    the dev sys on my desk running 1.17 desktop
    the PCEngines board which has Debian, 
        but for some reason also has busybox 1.10 lying around.

I have now understood that 
O different revisions of busybox have made different choices 
    - the standard columns output by ps have changed over time.
O even the same issue level of busybox may have been built with
   or without many options - so the ps command may, or may not,
   support the -o option to customise it's output. 
Therefore I can't depend on the field order, nor on the presence of an
option to alter it
I've solved that by poking around in /proc ... but heaven help us, that
may not even exist on some computers, so I will need yet another level of
complexity for full portability :-(
        
Without risking breaking those boxes, which are sitting in fields in Peru
and other places, and I CANNOT afford to go and reboot them.
        
Now you might WELL say to me that I'm looking at it wrong. You may say
that when I install my updated s/w I should also install a new busybox
exe, on whatever machine, and use it.

You might even say that all of my s/w should use "busybox ps", or set a
path at start-up so that busybox is preferred to any Debian utilities
lying around.

Maybe that is the right approach, and I should get used to the idea that
busybox is actually part of my app, not part of the system. Except there
are things in /etc/init.d that use busybox too. Maybe I need to download
and update EVERY script on the system with my app. Better find them all
first.
And if anything else I don't update is doing system() calls I'd better
pray the new busybox works the same.

Perhaps I should set up myapp/sbin myapp/bin myapp/usr/bin and
myapp/usr/sbin and stick those on the front of the path, and set links so
my app sees my latest busybox, but any existing s/w on the machine sees
the environment it was used to...

Do you, or does anyone else here, know how to square this circle?

D






In article <[email protected]>,
[email protected] (Denys Vlasenko) wrote:

> *From:* Denys Vlasenko <[email protected]>
> *To:* [email protected]
> *Date:* Thu, 3 Feb 2011 04:02:43 +0100
> 
> On Wednesday 02 February 2011 20:58, Cathey, Jim wrote:
> > ># find . -depth -print | pax -wd > outfile.tar
> > >
> > >That would be more portable (not all systems have /proc)
> > 
> > Not all systems have a nice place you can safely write
> > a list file, either.  One would also need to arrange to clean
> > up this file afterwards, and to make sure it was not included
> > in the list itself, or else is given to tar as an exclusion.
> > Ideally the list file is auto-generated, and's a name that can
> > never collide.  mktemp stuff.
> > 
> > Either way, potential complications.  I'm still trying
> > to get used to /proc/self/fd/0 versus /dev/stdin!
> 
> find . -depth -print | tar ... -T -
> 
> but you need a small fix for -T - to read stdin:
> -- 
> vda
> 
> diff -ad -urpN busybox.5/archival/tar.c busybox.6/archival/tar.c
> --- busybox.5/archival/tar.c  2011-01-31 05:50:34.000000000 +0100
> +++ busybox.6/archival/tar.c  2011-02-03 03:59:05.000000000 +0100
> @@ -655,7 +655,7 @@ static llist_t *append_file_list_to_list
>       llist_t *newlist = NULL;
>  
>       while (list) {
> -             src_stream = xfopen_for_read(llist_pop(&list));
> +             src_stream = xfopen_stdin(llist_pop(&list));
>               while ((line = xmalloc_fgetline(src_stream)) != NULL) {
>                       /* kill trailing '/' unless the string is just "/" */
>                       char *cp = last_char_is(line, '/');
> 
> 
> 
> _______________________________________________
> busybox mailing list
> [email protected]
> http://lists.busybox.net/mailman/listinfo/busybox
> 
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to