Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Sep 2013 21:10:48 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r255408 - user/cperciva/freebsd-update-mirror
Message-ID:  <201309082110.r88LAmef065906@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cperciva
Date: Sun Sep  8 21:10:48 2013
New Revision: 255408
URL: http://svnweb.freebsd.org/changeset/base/255408

Log:
  Refuse to create a new package of bits with the same name as an old package.
  The mirroring code keeps track of which packages it has downloaded already,
  so this would result in bits never reaching the mirrors.
  
  Submitted by:	delphij

Modified:
  user/cperciva/freebsd-update-mirror/umirror-package.sh

Modified: user/cperciva/freebsd-update-mirror/umirror-package.sh
==============================================================================
--- user/cperciva/freebsd-update-mirror/umirror-package.sh	Sun Sep  8 21:07:41 2013	(r255407)
+++ user/cperciva/freebsd-update-mirror/umirror-package.sh	Sun Sep  8 21:10:48 2013	(r255408)
@@ -15,6 +15,13 @@ fi
 # Set an ID if we don't have one already
 if [ -z "${ID}" ]; then
 	ID=`date "+%s"`
+else
+	while read EID X Y; do
+		if [ "${EID}" = "${ID}" ]; then
+			echo "Error: ${ID} already exists, this may be not what you want."
+			exit 1
+		fi
+	done < "${PRIVDIR}/flist"
 fi
 
 # Check that the files we're publishing have publishable permissions



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