From owner-freebsd-current@FreeBSD.ORG Sat Aug 28 00:36:37 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9665A16A4CE for ; Sat, 28 Aug 2004 00:36:37 +0000 (GMT) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51B3943D46 for ; Sat, 28 Aug 2004 00:36:37 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from freebsd.org (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id i7S0aa90038681; Fri, 27 Aug 2004 17:36:37 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <412FD394.50307@freebsd.org> Date: Fri, 27 Aug 2004 17:36:36 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ceri Davies References: <20040827010919.GY37255@submonkey.net> In-Reply-To: <20040827010919.GY37255@submonkey.net> Content-Type: multipart/mixed; boundary="------------000109030408080309070205" cc: current@freebsd.org Subject: Re: 5.3-BETA1 spews PaxHeader directories X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2004 00:36:37 -0000 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--