Jake Hamby <[EMAIL PROTECTED]> wrote:

> As you can see, star is the fastest and gtar is the slowest.  My only 
> complaint with star is that you can't combine single-letter options together 
> ("tar -xzf", "tar -cjvf", etc.) like you can with every other version of tar. 
>  I'll have to have a look at the source and see how easy it would be to 
> remedy this issue.

This is not true, there is no such issue with star.

The star commandline interface completely matches the historical tar behavior
and GNU make has big deviations from this interface (GNU tar even does not
work as expeceted if you play a bit with the order of options). The problem
seems to be that people don't gauge star with the official tar CLI but with the
broken GNU tar CLI.

-       The command line samples you mention above are incompatible with 
        documented behavior of the command 'tar'

-       Star is the tar implementation that has the best match of POSIX 
        CLI basic rules.

-       POSIX states that if you like to check a commandline for correctness
        you need to first read it's man page as POSIX contains a lot of
        exceptions to cover historical behavior of specific programs.

-       Star matches both: the historical tar behavior that has been 
        standardized in SUSv2 _and_ the general CLI guidelines from POSIX.

-       The historical tar CLI as documented in SUSv2 does not mention the '-'.
        If you use the '-' for options, the behavior of tar is undefined.

-       The POSIX CLI does only allow to combine POSIX compliant (-<letter>)
        single char options if they are of type boolean but not if they 
        have args.

-       The historical tar CLI is highly fault-prone and I did see a lot
        of source *.c files in my life that have been overwritten by a tar
        that was used in a lazy way. Star tries it's best to avoid the problems
        with the missconcept in the historical tar CLI.

Star tries the best possible aproach you can do:

-       If you let options start with '-', it follows POSIX general CLI 
        guidelines (although it needs to use long options because it
        currently implements 167 different options).

        So you may only combine 'boolean' single char flags.

-       If you use a command line that is compatible with the SUSv2 standard
        (which means for star that the first argument for star does not start
        with a '-'), star allows you to combine even options that have args.

        If you do some permutaion checks, you will see that star always behaves
        correct while GNU tar fails with some of the valid permuations.

        The only exception star use with the SUSv2 CLI is that star does not
        allow you to use 'star cf file args' when 'file' exists and is a plain
        file with a size > 0. This is to try to avoid overwritten source files
        from a lazy written command line.




Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
       [EMAIL PROTECTED]                (uni)  
       [EMAIL PROTECTED]        (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to