[BusyBox] Tar problems continue

Richard Doyle rdoyle at islandnetworks.com
Thu Feb 14 11:09:04 UTC 2002


Glenn-

I'm still getting odd behavior from tar in the unstable branch of
BusyBox (tar.c dated Feb 12 20:45), compiled under uClibc. Busybox tar
improperly handles the list of files to be processed when creating a tar
file: absolute paths are required, and only the last file or directory
in the list of files is added to the tarfile.

# pwd
/tmp/test
# mkdir dira
# mkdir dirb
# mkdir dirc
# tar -cf tarball.tar dira dirb dirc
# tar -tf tarball.tar
# tar -cf tarball.tar ./dira ./dirb ./dirc
# tar -tf tarball.tar
# tar -cf tarball.tar /tmp/test/dira /tmp/test/dirb /tmp/test/dirc
tar: Removing leading '/' from member names
# tar -tf tarball.tar
./tmp/test/dirc/
# tar -cf tarball.tar /tmp/test/dirc /tmp/test/dira /tmp/test/dirb
tar: Removing leading '/' from member names
# tar -tf tarball.tar
./tmp/test/dirb/

Similar results happen when I use files instead of directories.

When using GNU tar 1.13.17 on a different system, I get:
richard at porker:/tmp/test$ mkdir dira
richard at porker:/tmp/test$ mkdir dirb
richard at porker:/tmp/test$ mkdir dirc
richard at porker:/tmp/test$ tar -cf tarball.tar dira dirb dirc
richard at porker:/tmp/test$ tar -tf tarball.tar
dira/
dirb/
dirc/

Tar from BusyBox 0.60.2 behaves like GNU tar.

-Richard




More information about the busybox mailing list