[prev] [thread] [next] [lurker] [Date index for 2003/09/18]
Please allow me to introduce you all to GNU tar. GNU tar does wonderful new things, none of which have been done in a mostly unchanging fashion for several decades. Since the code is in such constant flux, sometimes it's inevitable that occasional bugs slip through the net of the keen and watchful GNU developers. Like, say, this one: I create an archive of /usr under Solaris, with `tar cvf usr.tar /usr`. I copy it to a Linux machine. I unpack it with `tar xvf usr.tar`. But wait. We have errors. They look like this: tar: usr/bin/uncompress: Cannot hard link to `/usr/bin/compress': No such file or directory tar: usr/bin/zcat: Cannot hard link to `/usr/bin/compress': No such file or directory tar: usr/bin/zipinfo: Cannot hard link to `/usr/bin/unzip': No such file or directory That doesn't seem right. Actually, the Solaris fetish for hard links doesn't seem right -- but of more importance to me right now, neither does the error; usr/bin/unzip *does* exist in the archive. Maybe an strace -elink will help: link("/usr/bin/compress", "usr/bin/uncompress") = -1 ENOENT (No such file or directory) link("/usr/bin/compress", "usr/bin/zcat") = -1 ENOENT (No such file or directory) link("/usr/bin/unzip", "usr/bin/zipinfo") = -1 ENOENT (No such file or directory) # ^ note leading slash So, while GNU tar's happy to remove leading slashes from archive paths while unpacking, it'd rather spew links straight through to the machine the archive's being unpacked on than to the archive it's just made for itself. CHRIS SMASH NOW. AXE FIRE PLASTIC. DEATH. BURN. (In case you're thinking that this'll be fixed by now, well, it's in the latest Debian stable tar (1.13.25). It's been reported to bug-gnu-utils on many occasions, including this one from _2001_: <http://mail.gnu.org/archive/html/bug-gnu-utils/2001-05/msg00217.html>.) - Chris. -- Chris Ball <cjb@xxxx.xxx.xx.xx> Inference Group: <http://www.inference.phy.cam.ac.uk/is/>
Generated at 14:02 on 01 Jul 2004 by mariachi 0.52