[24968] trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed May 9 07:17:22 PDT 2007


Revision: 24968
          http://trac.macosforge.org/projects/macports/changeset/24968
Author:   dluke at macports.org
Date:     2007-05-09 07:17:22 -0700 (Wed, 09 May 2007)

Log Message:
-----------
Use the mprsyncup strategy of pulling base/ from the RELEASE_URL

Modified Paths:
--------------
    trunk/base/portmgr/IndexRegen.sh

Property Changed:
----------------
    trunk/


Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 023a8b07-a327-4f20-9012-67c915bb7b7c:/local/branches/updates:21118
023a8b07-a327-4f20-9012-67c915bb7b7c:/local/trunk:21326
40426cdb-d25d-4106-b89a-567fc1e9311f:/local/trunk:22799
a2b01108-8822-4c85-91cd-1541804339d8:/local/macports:20632
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/libdnet-maintainer:20898
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/p5-app-cli:20923
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/p5-list-moreutils:20919
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/p5-path-class:20929
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/updates:20946
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/trunk:20947
d9146071-5dc1-4620-afc7-8ba4e23d31df:/local/trunk:21690
f2dd1c64-7982-4318-98ce-263798263e0a:/local:25157
fd7794eb-1723-4a49-8be4-c69b2a184b6d:/local/trunk:24020
   + 023a8b07-a327-4f20-9012-67c915bb7b7c:/local/branches/updates:21118
023a8b07-a327-4f20-9012-67c915bb7b7c:/local/trunk:21326
40426cdb-d25d-4106-b89a-567fc1e9311f:/local/trunk:22799
a2b01108-8822-4c85-91cd-1541804339d8:/local/macports:20632
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/libdnet-maintainer:20898
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/p5-app-cli:20923
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/p5-list-moreutils:20919
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/p5-path-class:20929
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/branches/updates:20946
b1dfe3f6-5eec-4605-9368-528ffc7f2357:/local/trunk:20947
d9146071-5dc1-4620-afc7-8ba4e23d31df:/local/trunk:21690
f2dd1c64-7982-4318-98ce-263798263e0a:/local:25193
fd7794eb-1723-4a49-8be4-c69b2a184b6d:/local/trunk:24020

Modified: trunk/base/portmgr/IndexRegen.sh
===================================================================
--- trunk/base/portmgr/IndexRegen.sh	2007-05-09 13:25:56 UTC (rev 24967)
+++ trunk/base/portmgr/IndexRegen.sh	2007-05-09 14:17:22 UTC (rev 24968)
@@ -21,9 +21,10 @@
 SPAM_LOVERS=macports-mgr at lists.macosforge.org,dluke at geeklair.net
 
 # Other settings (probably don't need to be changed).
-SVN_DPORTS_URL=http://svn.macports.org/repository/macports/trunk/dports
-SVN_BASE_URL=http://svn.macports.org/repository/macports/trunk/base
 SVN_CONFIG_DIR=${ROOT}/svnconfig
+REPO_BASE=http://svn.macports.org/repository/macports
+RELEASE_URL_FILE="config/RELEASE_URL"
+SVN="/opt/local/bin/svn -q --non-interactive --config-dir $SVN_CONFIG_DIR"
 # Where to checkout the source code. This needs to exist!
 SRCTREE=${ROOT}/source
 # Where MP will install its world. This gets created.
@@ -60,24 +61,40 @@
     exit 1
 fi
 
-# Update both the ports tree and base sources, bail out if they don't exist beforehand.
-if [ ! -d ${SRCTREE}/dports/.svn ]; then
-    echo "No dports tree found at ${SRCTREE}. This needs to exist (with proper svn \
-        credentials at ${SVN_CONFIG_DIR}) prior to runnig this script." > $FAILURE_LOG; bail
+# Checkout/update the dports tree
+if [ -d ${SRCTREE}/dports ]; then
+    $SVN update ${SRCTREE}/dports > $FAILURE_LOG 2>&1 \
+        || { echo "Updating the dports tree from $REPO_BASE/trunk/dports failed." >> $FAILURE_LOG; bail ; }
 else
-    cd ${SRCTREE}/dports && \
-	svn -q --non-interactive --config-dir $SVN_CONFIG_DIR update > $FAILURE_LOG 2>&1 \
-	|| { echo "Updating the ports tree from $SVN_DPORTS_URL failed." >> $FAILURE_LOG ; bail ; }
+    $SVN checkout ${REPO_BASE}/trunk/dports ${SRCTREE}/dports > $FAILURE_LOG 2>&1 \
+        || { echo "Checking out the dports tree from $REPO_BASE/trunk/dports failed." >> $FAILURE_LOG; bail ; }
 fi
-if [ ! -d ${SRCTREE}/base/.svn ]; then
-    echo "No base sources found at ${SRCTREE}. This needs to exist (with proper svn \
-        credentials at ${SVN_CONFIG_DIR}) prior to running this script." > $FAILURE_LOG; bail
+
+# Checkout/update HEAD
+TMPDIR=mp_trunk/base
+if [ -d ${ROOT}/${TMPDIR} ]; then
+    $SVN update ${ROOT}/${TMPDIR} > $FAILURE_LOG 2>&1 \
+        || { echo "Updating the trunk from $REPO_BASE/trunk/base failed." >> $FAILURE_LOG; bail ; }
 else
-    cd ${SRCTREE}/base && \
-	svn -q --non-interactive --config-dir $SVN_CONFIG_DIR update > $FAILURE_LOG 2>&1 \
-       || { echo "Updating the base sources from $SVN_BASE_URL failed." >> $FAILURE_LOG ; bail ; }
+    $SVN checkout ${REPO_BASE}/trunk/base ${ROOT}/${TMPDIR} > $FAILURE_LOG 2>&1 \
+        || { echo "Checking out the trunk from $REPO_BASE/trunk/base failed." >> $FAILURE_LOG; bail ; }
 fi
+echo `date -u +%s` > ${ROOT}/DPORTS-TIMESTAMP
 
+# Extract the release URL from HEAD
+read RELEASE_URL < ${ROOT}/${TMPDIR}/${RELEASE_URL_FILE}
+[ -n ${RELEASE_URL} ] || { echo "no RELEASE_URL specified in svn HEAD." >> $FAILURE_LOG; bail ; }
+
+# Checkout/update the release base
+if [ -d ${SRCTREE}/base ]; then
+    $SVN switch ${RELEASE_URL}/base ${SRCTREE}/base > $FAILURE_LOG 2>&1 \
+        || { echo "Updating base from ${RELEASE_URL}/base failed." >> $FAILURE_LOG; bail ; }
+else
+    $SVN checkout $RELEASE_URL/base ${SRCTREE}/base > $FAILURE_LOG 2>&1 \
+        || { echo "Checking out base from ${RELEASE_URL}/base failed." >> $FAILURE_LOG ; bail ; }
+fi
+echo `date -u +%s` > ${ROOT}/BASE-TIMESTAMP
+
 # (re)configure.
 cd ${SRCTREE}/base/ && \
     mkdir -p ${TCLPKG} && \

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070509/ed705e3c/attachment.html


More information about the macports-changes mailing list