Changeset 1365


Ignore:
Timestamp:
Jul 22, 2009 10:00:32 AM (11 years ago)
Author:
tkr
Message:

Merging r1364 from trunk to stable/0.6

Location:
stable/0.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable/0.6

    • Property svn:mergeinfo changed
      /trunk (added)merged: 1364
  • stable/0.6/prepare_new_release

    r1362 r1365  
    232232# stableExternals, on the other hand, specifies externals for which we are
    233233# doing simultaneous releases. We will use the stable branch of the external
    234 # while preparing and testing this release candidate, changing the Externals
     234# while preparing and testing this release candidate, changing the Dependencies
    235235# file to specify a (nonexistent) release of the external at the last moment.
    236236
     
    374374    release)
    375375  - Check out a clean copy of the specified stable branch, without externals
    376   - Read the Externals file and create a new Externals file for the release
    377     by converting references to stable branches to references to the most
    378     recent release for that stable branch.
     376  - Make sure that the svn:externals property points to releases
    379377  - Create a new package configure.ac file with the release version number
    380378    specified in the AC_INIT macro.
    381   - Set the svn:externals property for the release package and check out the
    382     code for the externals.
    383379  - Use the "get.*" scripts to download any ThirdParty code.
    384380  - Execute run_autotools to update configure, Makefile.in, etc., to reflect
    385381    the most recent release of BuildTools.
    386   - Check that all dependencies are using the same version of the BuildTools
    387382  - Run the configure script, compile the code, and run the unit test.
    388   - Replace any stable references in Externals (specified with -s) with the
     383  - Replace any stable branches in externals (specified with -s) with the
    389384    appropriate (yet to be committed) release.
    390385
     
    394389If the script completes without error, examine the output, particularly the
    395390output of the unit test ('make test') and the set of externals specified in
    396 the Externals file.
     391the Dependencies file.
    397392
    398393This script does not make any changes to the repository.  If you want to
     
    514509done
    515510
    516 # Now fix up the Externals file, if it exists. References to stable branches
     511# Now fix up the Dependencies file, if it exists. References to stable branches
    517512# will be converted to references to releases unless the reference is to a
    518 # project in the stableExternals list. Each line in an Externals file has the
     513# project in the stableExternals list. Each line in a Dependencies file has the
    519514# format <ext_name> <ext_url>. The reference must be to a stable branch.
    520515
    521 if test -r Externals; then
    522 
    523   echo ''
    524   echo '===> Creating new Externals file with pointers to releases...'
    525   echo ''
    526 
    527   rm -f Externals.releases
     516if test -r Dependencies; then
     517
     518  echo ''
     519  echo '===> Checking externals for releases and buildtools version...'
     520  echo ''
     521
     522  buildtools_stable=`svn pget svn:externals $stableURL | grep -e "BuildTools/releases" | sed -e 's|.*/releases/\([0-9]*.[0-9]*\).[0-9]*|\1|'`
     523
     524  echo "$stableProj uses build tools stable version $buildtools_stable"
     525  echo ''
     526
     527  rm -f Externals
    528528  ext_name=
    529529  ext_url=
    530   for i in `cat Externals`; do
     530  for i in `cat Dependencies`; do
    531531    if test "$ext_name" = ""; then
    532532      ext_name="$i"
    533533    else
     534      echo "Now checking $ext_name..."
     535      echo ''
    534536      ext_url=$i
    535537      if (echo $ext_name | grep -E '^#' >/dev/null); then
    536         echo "Skip $ext_name $ext_url."
     538        echo "===> Skip $ext_name $ext_url."
    537539        ext_name=
    538540        continue
     
    542544      else
    543545        echo ''
    544         echo "The external URL $ext_url is not a stable branch or release. Exiting."
     546        echo "===> The external URL $ext_url is not a stable branch or release. Exiting."
    545547        echo ''
    546548        exit -2
    547549      fi
    548550
     551#      buildtools_version=`svn pget svn:externals $ext_url | grep -e "BuildTools/releases" | sed -e 's|.*/releases/\([0-9]*.[0-9]*\).[0-9]*|\1|'`
     552      ext_stable=`echo $ext_url | sed -e 's|\(.*/stable/[0-9]*.[0-9]*/\).*|\1|'`
     553      buildtools_version=`svn pget svn:externals $ext_stable | grep -e "BuildTools/stable" | sed -e 's|.*/stable/\([0-9]*.[0-9]*\)|\1|'`
     554
     555      if test "$buildtools_stable" = "$buildtools_version"; then
     556        echo '===> Build tools consistency check OK'
     557      elif test "$buildtools_version" = ""; then
     558        echo "===> Skipping build tools version check for $ext_name"
     559      else
     560        echo $ext_name >>problems.ext
     561      fi
     562
     563      if test -r problems.ext; then
     564        echo ''
     565        echo 'PROBLEM DURING CONSISTENCY CHECK:'
     566        echo ''
     567        echo ''
     568        echo "External $ext_name uses stable version $buildtools_version of the build tools"
     569        echo "$stableProj uses stable version $buildtools_stable of the build tools"
     570        echo ''
     571        cat problems.ext
     572        echo ''
     573        rm -f problems.ext
     574        if test $ignoreBuildToolsMismatch = 0 ; then
     575           exit -2
     576        else
     577          echo "Continuing in spite of BuildTools mismatch."
     578        fi
     579      fi
     580
    549581      ext_base_front=`echo $ext_url | sed -e 's|/stable/.*||'`
    550582      ext_proj=`echo $ext_base_front | sed -e 's|.*/\([^/]*\)|\1|'`
    551583
    552584      if expr "$stableExternals" : '.*'"$ext_proj"'.*' 2>&1 >/dev/null ; then
    553         echo "Using stable reference for $ext_name."
     585        echo "===> Using stable reference for $ext_name."
    554586        ext_rel_url=$ext_url
    555587      elif expr "$ext_url" : '.*releases/.*' 2>&1 >/dev/null ; then
    556         echo "Using specified release for $ext_name."
     588        echo "===> Using specified release for $ext_name."
    557589        ext_rel_url=$ext_url
    558590      else
    559591        ext_stable=`echo $ext_url | sed -e 's|\(.*/stable/[0-9\.]*\).*|\1|'`
    560592        ext_base_end=`echo $ext_url | sed -e 's|.*/stable/[0-9\.]*||'`
    561 
    562         echo "Determining release replacement for $ext_name:"
    563         ext_latest=`determine_release $ext_stable 0`
     593        ext_stable_branch=`echo $ext_stable | sed -e 's|.*/stable/||'`
     594
     595        echo "===> Determining release replacement for $ext_name:"
     596        ext_latest=$ext_stable_branch.`determine_revision $ext_stable 0`
    564597
    565598        if test "$ext_base_end" = ""; then
     
    570603      fi
    571604
    572       echo "  $ext_rel_url"
    573       echo "$ext_name  $ext_rel_url" >>Externals.releases
     605      echo "     $ext_rel_url"
     606      echo "$ext_name  $ext_rel_url" >>Externals
    574607      ext_name=
     608      echo ''
    575609    fi
    576610  done
    577 
    578   echo ''
    579   echo '===> Creating backup (.bak) for Externals'
    580   mv Externals Externals.bak
    581   mv Externals.releases Externals
    582611
    583612  echo ''
     
    646675  BuildTools/run_autotools
    647676fi
    648 
    649 if test -r Externals; then
    650 
    651   echo '===> Verifying consistency of the BuildTools versions...'
    652   echo ''
    653 
    654   ext_name=
    655   ext_url=
    656   rm -f problems.ext
    657   for i in `cat Externals`; do
    658     if test "$ext_name" = ""; then
    659       ext_name="$i"
    660     else
    661       ext_url=$i
    662 
    663       echo "  checking $ext_name"
    664 
    665       num_M=`svn status $ext_name | grep -E '^M' | wc -l`
    666 
    667       if test $num_M -ne 0; then
    668         echo $ext_name >>problems.ext
    669         echo '    ... BuildTools not consistent!'
    670       else
    671         echo '    ... Ok'
    672       fi
    673       ext_name=
    674     fi
    675   done
    676 
    677   if test -r problems.ext; then
    678     echo ''
    679     echo 'PROBLEM DURING CONSISTENCY CHECK:'
    680     echo ''
    681     echo 'Please contact the project manager(s) for the following project(s).'
    682     echo 'A new release needs to be made with your stable branch of BuildTools.'
    683     echo ''
    684     cat problems.ext
    685     echo ''
    686     rm -f problems.ext
    687     if test $ignoreBuildToolsMismatch = 0 ; then
    688       exit -2
    689     else
    690       echo "Continuing in spite of BuildTools mismatch."
    691     fi
    692   fi
    693   rm -f problems.ext
    694 fi # if test -r Externals
    695677
    696678if test $isThirdParty != yes && test $isData != yes; then
     
    791773echo "and run the commit_new_release script"
    792774
     775rm -rf Externals
     776
    793777cat >.new_release_data <<EOF
    794778isData=$isData
Note: See TracChangeset for help on using the changeset viewer.