From owner-svn-src-head@FreeBSD.ORG Thu Jul 11 22:19:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CA1D3CA9; Thu, 11 Jul 2013 22:19:18 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BAE5D1955; Thu, 11 Jul 2013 22:19:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BMJIGY042097; Thu, 11 Jul 2013 22:19:18 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BMJIi8042095; Thu, 11 Jul 2013 22:19:18 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201307112219.r6BMJIi8042095@svn.freebsd.org> From: Colin Percival Date: Thu, 11 Jul 2013 22:19:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253224 - head/usr.sbin/portsnap/portsnap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 11 Jul 2013 22:19:18 -0000 Author: cperciva Date: Thu Jul 11 22:19:18 2013 New Revision: 253224 URL: http://svnweb.freebsd.org/changeset/base/253224 Log: Fix bug in deleting files: If two ports had the same tarball and one of them changed (or was removed from the tree) then portsnap would delete that file. This happened earlier today when one of two empty port directories was removed. Uniquifying the lists of needed files fixes this. 9.2-RELEASE candidate. MFC after: 3 days Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- head/usr.sbin/portsnap/portsnap/portsnap.sh Thu Jul 11 22:15:14 2013 (r253223) +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Thu Jul 11 22:19:18 2013 (r253224) @@ -864,8 +864,8 @@ fetch_update() { echo "done." # Remove files which are no longer needed - cut -f 2 -d '|' tINDEX INDEX | sort > oldfiles - cut -f 2 -d '|' tINDEX.new INDEX.new | sort | comm -13 - oldfiles | + cut -f 2 -d '|' tINDEX INDEX | sort -u > oldfiles + cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u | comm -13 - oldfiles | lam -s "files/" - -s ".gz" | xargs rm -f rm patchlist filelist oldfiles