Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jul 2013 22:19:18 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r253224 - head/usr.sbin/portsnap/portsnap
Message-ID:  <201307112219.r6BMJIi8042095@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307112219.r6BMJIi8042095>