Am Sun, 25 Aug 2013 16:03:39 +0200
schrieb Joerg Schilling
So, your script will fail if "$TAR" is 'star'.
It will also fail with plain vanilla "tar" - it will not even work with gtar because neither tar nor gtar support an option "a". I tried with star 1.5 which is the version in openSUSE factory (and its gnutar). This version does not yet support xz compression. Besides, I noticed that the parameters and the output are very different from GNU tar. Probably different enough to make a separate extfs script for star, or at least to handle each case specific on the used *tar.
Star will list access time with -a, do you really like this?
OK let us make a list:
$TAR tvaf "$1" will not work for "a"
$TAR raf "$1" "$2" will not work for "a"
$TAR xaOf "$1" "$2" > "$3" will not work for "a" and AND "O"
$TAR raf "$1" "$2" >/dev/null will not work for "a"
$TAR --delete -af "$1" "$2" >/dev/null will not work for --delete and "a"
"which" is a csh script and does not interact nicely with a Bourne Shell
If you fix the options, you will fail at other places:
--- Make sure that you will not assume that you may extend compresed archives
mctarfs_list makes illegal assumptions on the list output gtar lists completely non-standard and non-reliable as it's list output was frequently changed across versions "tar" lists in a historic way that was never standardized star when used with -pax-ls will list in the way that was standardized for POSIX pax.
mctarfs_copyin Be careful, this _appends_ a second copy of a file to an archive.
mctarfs_rm --delete is not doable in-place with tar archives if you implement a FIFO for efficient archive handling. but this is gtar only anyway ....
Note that appending to a tar archive will even work with real tapes, but removing things from an archive cannot be done on tapes.
it is a good hint that adding or deleting from tar archives are risky operations. Probably its better not to support it at all in this extfs script. For compressed archives (maybe most common?) GNU tar (1.26) will reject modification. Dieter -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org