svn commit: r255408 - user/cperciva/freebsd-update-mirror
Colin Percival
cperciva at FreeBSD.org
Sun Sep 8 21:10:49 UTC 2013
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
More information about the svn-src-user
mailing list