[Tfug] tar pits

Bexley Hall bexley401 at yahoo.com
Mon Aug 27 17:36:25 MST 2007


Hi,

I am hoping this is a "d'oh" type question...  :>

The sources for NetBSD (for a given port) are
distributed as a set of gzip'ed tarballs.  Most
are expected to be unpacked from /.

Since the machine in question has a small disk,
I store the sources on a second drive that I
spin up only on those rare occasions when I
actually *need* access to those sources (most
often the pkgsrc file hierarchy).

# mkdir /Source
# mount /dev/sd1a /Source
# cd /Source
# mkdir src pkgsrc xsrc
# cd /usr
# ln -s /Source/src
# ln -s /Source/pkgsrc
# ln -s /Source/xsrc
# cd /
# tar xzpf /pathtotarballs/xsrc.tar.gz
# tar xzpf /pathtotarballs/gnusrc.tar.gz
# tar xzpf /pathtotarballs/syssrc.tar.gz
# tar xzpf /pathtotarballs/sharesrc.tar.gz
...

This works as I intend -- *almost*  :<
I.e., the contents of the tarballs are unpacked
into the directories on the /Source filesystem
(which is on the "spare" drive).

*But*, this isn't true for all of the tarballs.
I *think* its the src.tar.gz tarball that clobbers
the /usr/src symlink and replaces it with a real
directory -- which causes that tarball to be
unpacked onto the /usr filesystem (which is not
what I intended)!

Any pointers?  (sure, I was able to workaround this
but would like to know what to watch out for in the
future to keep myself from shooting my feet again!)
I will check the tarballs tonight for hints as to
how they may have been *built* differently...

Thx,
--don





       
____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when. 
http://tv.yahoo.com/collections/222




More information about the tfug mailing list