Subject: pax and tarball with "/./" in it: "File exists"
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 06/04/2004 12:07:57
I noticed with iptables-1.2.9 tarball that NetBSD's pax (as tar) may have
an error. For example (under NetBSD 1.6.2):


$ ln -s /bin/pax tar
$ bzcat /usr/pkgsrc/distfiles/iptables-1.2.9.tar.bz2 | ./tar xvf -
iptables-1.2.9/.
tar: Could not create: iptables-1.2.9/. <File exists>
iptables-1.2.9/./extensions
iptables-1.2.9/./extensions/.#libipt_ECN.c.1.7
iptables-1.2.9/./extensions/.#libipt_recent.c.1.6
iptables-1.2.9/./extensions/.BALANCE-test
iptables-1.2.9/./extensions/libipt_TCPLAG.c
iptables-1.2.9/./extensions/.TCPLAG-test
iptables-1.2.9/./extensions/.FTOS-test
iptables-1.2.9/./extensions/.IPMARK-test
...
$ echo $?
0


When used in pkgsrc (where pax-20031220 is my tar), I get

tar: Cannot create iptables-1.2.9/. (File exists)
*** Error code 1

It extracts fine, but the build stops there. The work/.extract_done cookie
is made though and I can restart the build from there.

Any ideas on where this "Error code 1" is coming from?

 Jeremy C. Reed

 	  	 	 BSD News, BSD tutorials, BSD links
	  	 	 http://www.bsdnewsletter.com/