common cvs-import.sh,1.24,1.25

Toshio Ernie Kuratomi (toshio) fedora-extras-commits at redhat.com
Tue Aug 28 14:54:24 UTC 2007


Author: toshio

Update of /cvs/pkgs/common
In directory cvs-int.fedora.redhat.com:/home/fedora/toshio/common

Modified Files:
	cvs-import.sh 
Log Message:
Modified to handle ACLs being set in a branch.  That restricted who could
access the toplevel directory.  Move the import.log file to the branch
directory to work around this.



Index: cvs-import.sh
===================================================================
RCS file: /cvs/pkgs/common/cvs-import.sh,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- cvs-import.sh	28 May 2007 00:46:04 -0000	1.24
+++ cvs-import.sh	28 Aug 2007 14:53:54 -0000	1.25
@@ -191,6 +191,12 @@
 # check if we have imported this entry
 TAG=$(echo "${NAME##[0-9]}-$VERSION-$RELEASE" | sed -e 's/[$,.:;@]/_/g')
 LOG_ENTRY="$TAG:${BRANCH:-HEAD}:$(basename $PACKAGE)"
+if [ -n "$(grep ""^$LOG_ENTRY"" ./${BRANCH}/import.log 2>/dev/null)" ] ; then
+    echo "ERROR: $PACKAGE was already imported on branch ${BRANCH:-HEAD}"
+    CleanUp
+    exit -2
+fi
+# Check here as well because back in the old days we used to write it here
 if [ -n "$(grep ""^$LOG_ENTRY"" ./import.log 2>/dev/null)" ] ; then
     echo "ERROR: $PACKAGE was already imported on branch ${BRANCH:-HEAD}"
     CleanUp
@@ -300,7 +306,7 @@
 rm -rf $TMP2
 
 # setup finished
-echo "$LOG_ENTRY:$(date +%s)" >> ./import.log
+echo "$LOG_ENTRY:$(date +%s)" >> ./${BRANCH}/import.log
 
 echo "======================================================================="
 cvs -Q diff -u




More information about the fedora-extras-commits mailing list