From owner-svn-src-head@FreeBSD.ORG Sun Nov 13 12:21:52 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E391106566B; Sun, 13 Nov 2011 12:21:52 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 1A8BB8FC08; Sun, 13 Nov 2011 12:21:52 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 198691DD757; Sun, 13 Nov 2011 13:21:51 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 0012C28468; Sun, 13 Nov 2011 13:21:50 +0100 (CET) Date: Sun, 13 Nov 2011 13:21:50 +0100 From: Jilles Tjoelker To: Garrett Cooper Message-ID: <20111113122150.GA62828@stack.nl> References: <201111130318.pAD3IvGr074144@svn.freebsd.org> <32EF12FA-07AC-481C-A407-3C8B578484C4@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32EF12FA-07AC-481C-A407-3C8B578484C4@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r227483 - head/usr.sbin/portsnap/portsnap X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2011 12:21:52 -0000 On Sat, Nov 12, 2011 at 07:25:23PM -0800, Garrett Cooper wrote: > On Nov 12, 2011, at 7:18 PM, Alfred Perlstein wrote: > > Author: alfred > > Date: Sun Nov 13 03:18:57 2011 > > New Revision: 227483 > > URL: http://svn.freebsd.org/changeset/base/227483 [snip] > > Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh > > ============================================================================== > > --- head/usr.sbin/portsnap/portsnap/portsnap.sh Sun Nov 13 03:01:58 2011 (r227482) > > +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Sun Nov 13 03:18:57 2011 (r227483) > > @@ -570,14 +570,16 @@ fetch_metadata_sanity() { [snip] > > + IFS='|' > > + echo "" 1>${QUIETREDIR} > > + grep -vE "^([0-9a-f]{64})\|\1$" | > > + while read X Y; do > > + printf "Processing: $X $Y ...\r" 1>${QUIETREDIR} > > + if [ -f "files/${Y}.gz" -o ! -f "files/${X}.gz" ]; then continue; fi > > + echo "${X}|${Y}" > > done > > + echo "" 1>${QUIETREDIR} > > + IFS= [snip] > > + IFS='|' > > + while read X Y; do > > if [ ! -f "${X}-${Y}.gz" ]; then continue; fi > > gunzip -c < ${X}-${Y}.gz > diff > > gunzip -c < files/${X}.gz > OLD > > @@ -707,6 +708,7 @@ fetch_update() { > > fi > > rm -f diff OLD NEW ${X}-${Y}.gz ptmp > > done < patchlist 2>${QUIETREDIR} > > + IFS= > > echo "done." [snip] > > + update_run_exract || return 1 > Wouldn't > oldIFS=$IFS > # Blah blah > IFS=$oldIFS > be better? That's too simple, it will change an unset IFS to a null IFS and the difference between those is major. If IFS is unset, it behaves the same as IFS=$' \t\n' and if IFS='' it disables field splitting. Given that you are already using 'local', why not use it everywhere? You may need to split up some functions to do this. -- Jilles Tjoelker