svn commit: r253337 - stable/9/usr.sbin/portsnap/portsnap

Colin Percival cperciva at FreeBSD.org
Sun Jul 14 07:58:11 UTC 2013


Author: cperciva
Date: Sun Jul 14 07:58:10 2013
New Revision: 253337
URL: http://svnweb.freebsd.org/changeset/base/253337

Log:
  MFC r253224:
    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.
  
  Approved by:	re (delphij)

Modified:
  stable/9/usr.sbin/portsnap/portsnap/portsnap.sh
Directory Properties:
  stable/9/usr.sbin/portsnap/portsnap/   (props changed)

Modified: stable/9/usr.sbin/portsnap/portsnap/portsnap.sh
==============================================================================
--- stable/9/usr.sbin/portsnap/portsnap/portsnap.sh	Sun Jul 14 04:42:35 2013	(r253336)
+++ stable/9/usr.sbin/portsnap/portsnap/portsnap.sh	Sun Jul 14 07:58:10 2013	(r253337)
@@ -809,8 +809,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
 


More information about the svn-src-stable mailing list