From owner-svn-src-all@FreeBSD.ORG Sun May 16 20:48:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A25241065672; Sun, 16 May 2010 20:48:02 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 58C828FC17; Sun, 16 May 2010 20:48:02 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.3/8.14.3) id o4GKmIjd006039; Sun, 16 May 2010 20:48:18 GMT (envelope-from kientzle@freebsd.org) Received: from horton.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id itt5meaxfyidh7etigcicbfwww; Sun, 16 May 2010 20:48:17 +0000 (UTC) (envelope-from kientzle@freebsd.org) Message-ID: <4BF059FF.8050002@freebsd.org> Date: Sun, 16 May 2010 13:47:59 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.23) Gecko/20100314 SeaMonkey/1.1.18 MIME-Version: 1.0 To: Anonymous References: <201005081628.o48GSM9s067363__30886.3841965378$1273336146$gmane$org@svn.freebsd.org> <86aas3oc8b.fsf@gmail.com> In-Reply-To: <86aas3oc8b.fsf@gmail.com> Content-Type: multipart/mixed; boundary="------------040200080200060400000804" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r207790 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 20:48:02 -0000 This is a multi-part message in MIME format. --------------040200080200060400000804 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Please try the attached patch and let me know if it fixes it for you... Cheers, Tim Anonymous wrote: > Tim Kientzle writes: > >> Author: kientzle >> Date: Sat May 8 16:28:22 2010 >> New Revision: 207790 >> URL: http://svn.freebsd.org/changeset/base/207790 >> >> Log: >> Config updates. >> >> Modified: >> head/usr.bin/tar/config_freebsd.h > > Smth broke after this commit. Hitting ^T causes ports to barf errors. > > before > > x11-toolkits/wxgtk28 $ make BATCH= patch > ===> Extracting for wxgtk2-2.8.10_4 > => MD5 Checksum OK for wxGTK-2.8.10.tar.bz2. > => SHA256 Checksum OK for wxGTK-2.8.10.tar.bz2. > load: 0.05 cmd: sh 64229 [running] 0.00r 0.00u 0.00s 0% 1576k > load: 0.05 cmd: bzip2 64231 [running] 0.19r 0.16u 0.00s 2% 4564k > load: 0.05 cmd: bsdtar 64232 [running] 0.36r 0.00u 0.13s 1% 2420k > load: 0.05 cmd: bzip2 64231 [running] 0.56r 0.47u 0.00s 4% 4568k > load: 0.05 cmd: bsdtar 64232 [running] 1.82r 0.05u 0.62s 6% 2448k > ===> Patching for wxgtk2-2.8.10_4 > ===> Applying FreeBSD patches for wxgtk2-2.8.10_4 > > after > > x11-toolkits/wxgtk28 $ make BATCH= patch > load: 0.05 cmd: make 63587 [zio->io_cv)] 0.19r 0.03u 0.00s 0% 1268k > ===> Extracting for wxgtk2-2.8.10_4 > load: 0.05 cmd: awk 63621 [zio->io_cv)] 0.01r 0.00u 0.00s 0% 1492k > => MD5 Checksum OK for wxGTK-2.8.10.tar.bz2. > => SHA256 Checksum OK for wxGTK-2.8.10.tar.bz2. > load: 0.05 cmd: bzip2 63631 [running] 0.13r 0.10u 0.00s 1% 4564k > wxGTK-2.8.10/contrib/include/wx/fl/controlbar.h: Error reading stdin > load: 0.05 cmd: bzip2 63631 [running] 0.34r 0.30u 0.00s 3% 4568k > tar: Error exit delayed from previous errors. > *** Error code 1 > > Looks like errors are related to extracting from stdin. > > $ bzip2 -dc wxGTK-2.8.10.tar.bz2 | tar xf - > load: 0.04 cmd: bzip2 65117 [running] 0.17r 0.07u 0.00s 0% 4564k > tar: Error reading stdin > load: 0.04 cmd: bzip2 65117 [running] 0.33r 0.23u 0.00s 2% 4568k > tar: Error exit delayed from previous errors. > zsh: broken pipe bzip2 -dc wxGTK-2.8.10.tar.bz2 | > zsh: exit 1 tar xf - > > --------------040200080200060400000804 Content-Type: text/x-patch; name="libarchive_retry_eintr.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libarchive_retry_eintr.patch" Index: archive_read_open_fd.c =================================================================== --- archive_read_open_fd.c (revision 208162) +++ archive_read_open_fd.c (working copy) @@ -116,11 +116,15 @@ ssize_t bytes_read; *buff = mine->buffer; - bytes_read = read(mine->fd, mine->buffer, mine->block_size); - if (bytes_read < 0) { - archive_set_error(a, errno, "Error reading fd %d", mine->fd); + for (;;) { + bytes_read = read(mine->fd, mine->buffer, mine->block_size); + if (bytes_read < 0) { + if (errno == EINTR) + continue; + archive_set_error(a, errno, "Error reading fd %d", mine->fd); + } + return (bytes_read); } - return (bytes_read); } #if ARCHIVE_API_VERSION < 2 Index: archive_read_open_filename.c =================================================================== --- archive_read_open_filename.c (revision 208162) +++ archive_read_open_filename.c (working copy) @@ -160,15 +160,19 @@ ssize_t bytes_read; *buff = mine->buffer; - bytes_read = read(mine->fd, mine->buffer, mine->block_size); - if (bytes_read < 0) { - if (mine->filename[0] == '\0') - archive_set_error(a, errno, "Error reading stdin"); - else - archive_set_error(a, errno, "Error reading '%s'", - mine->filename); + for (;;) { + bytes_read = read(mine->fd, mine->buffer, mine->block_size); + if (bytes_read < 0) { + if (errno == EINTR) + continue; + else if (mine->filename[0] == '\0') + archive_set_error(a, errno, "Error reading stdin"); + else + archive_set_error(a, errno, "Error reading '%s'", + mine->filename); + } + return (bytes_read); } - return (bytes_read); } #if ARCHIVE_API_VERSION < 2 --------------040200080200060400000804--