Date: Fri, 27 Aug 2004 17:36:36 -0700 From: Tim Kientzle <kientzle@freebsd.org> To: Ceri Davies <ceri@submonkey.net> Cc: current@freebsd.org Subject: Re: 5.3-BETA1 spews PaxHeader directories Message-ID: <412FD394.50307@freebsd.org> In-Reply-To: <20040827010919.GY37255@submonkey.net> References: <20040827010919.GY37255@submonkey.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------000109030408080309070205 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Ceri Davies wrote: > I've just installed 5.3-BETA1/i386 from the ISOs distributed the other > week, and have found my file hierarchy littered with PaxHeader > directories. > > I understand where they've come from, but new users may not, and they're > also unlikely to know whether they're safe to delete. Here's one possible solution: The attached patch modifies cpio to recognize and ignore the pax extensions. Tim --------------000109030408080309070205 Content-Type: text/plain; name="cpio-ignore-pax.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cpio-ignore-pax.diff" Index: tar.c =================================================================== RCS file: /home/ncvs/src/contrib/cpio/tar.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 tar.c --- tar.c 29 Mar 1997 22:40:44 -0000 1.1.1.1 +++ tar.c 28 Aug 2004 00:29:40 -0000 @@ -343,6 +343,19 @@ else file_hdr->c_mode |= CP_IFREG; break; + case 'x': case 'g': + /* Ignore pax 'x' and 'g' extension entries. */ + /* Skip body of this entry. */ + while (file_hdr->c_filesize > 0) { + tape_buffered_read(((char *) &tar_rec), in_des, TARRECORDSIZE); + if (file_hdr->c_filesize > TARRECORDSIZE) + file_hdr->c_filesize -= TARRECORDSIZE; + else + file_hdr->c_filesize = 0; + } + /* Read next header and return that instead. */ + read_in_tar_header(file_hdr, in_des); + break; } break; } --------------000109030408080309070205--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?412FD394.50307>