Changeset 1845


Ignore:
Timestamp:
Nov 23, 2010 12:40:12 PM (10 years ago)
Author:
lou
Message:

Implement command-line list to ignore buildtools mismatch for specified
projects.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/prepare_new_release

    r1828 r1845  
    5353
    5454printHelp=0
    55 ignoreBuildToolsMismatch=0
     55ignoreBuildToolsMismatch=no
     56mismatchBTExternals=
    5657suppressCheckout=0
    5758
     
    9899    case "$1" in
    99100      -h* | --h*) printHelp=1 ;;
    100       -i* | --i*) ignoreBuildToolsMismatch=1 ;;
     101      -i* | --i*)
     102           if expr "$1" : '.*-i.*=.*' 2>&1 >/dev/null ; then
     103             mismatchBTExternals=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'`
     104           else
     105             shift
     106             mismatchBTExternals=$1
     107           fi
     108           if test "x$mismatchBTExternals" = "xall" ; then
     109             ignoreBuildToolsMismatch=all
     110           else
     111             ignoreBuildToolsMismatch=partial
     112           fi
     113           ;;
    101114      -p* | --p*) suppressCheckout=1 ;;
    102115      -s* | --s*)
     
    233246  -b <BuildToolsURL>    URL for BuildTools; required to generate a release
    234247                        for a ThirdParty or Data project.
    235   -i                    Ignore BuildTools version mismatches in externals.
     248  -i <projectlist>      Ignore BuildTools version mismatches for the listed
     249                        externals (comma-separated list of project names,
     250                        e.g., -i Osi,Cbc). '-i all' ignores all mismatches.
    236251  -p                    Suppress checkout (useful for testing)
    237252  -s <projectlist>      Suppress conversion from stable to release for the
    238253                        listed externals (comma-separated list of project
    239                         names, e.g., -s Osi,Cbc).
     254                        names).
    240255  -x <projectlist>      Remove the listed projects from the list of externals
    241256                        (comma-separated list of project names).
     
    553568          testResult=`compareURLVersions "$ourBTURL" "$extBTURL"`
    554569          if test $testResult = no ; then
    555             echo "    WARNING: BuildTools mismatch: $ext_rel_url_notail uses $extBTURL"
    556             if test $ignoreBuildToolsMismatch = 0 ; then
    557                buildtoolsMismatch=1
     570            if test $ignoreBuildToolsMismatch = all || \
     571               expr "$mismatchBTExternals" : '.*'$ext_proj'.*' 2>&1 >/dev/null ; then
     572              echo "    WARNING: BuildTools mismatch: $ext_url_notail uses $extBTURL"
     573            else
     574              buildtoolsMismatch=1
     575              echo "    ERROR: BuildTools mismatch: $ext_url_notail uses $extBTURL"
    558576            fi
    559577          fi
    560578        fi
    561579      fi
    562 
    563580      echo "$ext_name  $ext_rel_url" >>Dependencies
    564581      ext_name=
     
    567584  done
    568585
    569 # If we have a BuildTools mismatch, and mismatch is not permitted, exit.
    570 
    571   if test $buildtoolsMismatch -gt $ignoreBuildToolsMismatch ; then
     586# If we have a BuildTools mismatch, exit.
     587
     588  if test $buildtoolsMismatch = 1 ; then
    572589    echo "Exiting due to BuildTools mismatches; use -i to ignore."
    573590    exit 2
    574591  fi
    575592
     593# Try to check out the externals. Try three times before failing.
    576594  echo ''
    577595  echo '===> Updating svn:externals property and checking out externals ...'
     
    579597
    580598  svn propset svn:externals -F Dependencies .
    581   svn update
     599  svn update ||
     600  { echo "Retry 1 ... " ; svn update ; } ||
     601  { echo "Retry 2 ... " ; svn update ; } ||
     602  { echo "Checkout of externals failed. Aborting." ; exit 3 ; }
    582603
    583604  if test -d ThirdParty ; then
  • trunk/prepare_new_stable

    r1815 r1845  
    4242
    4343printHelp=0
    44 ignoreBuildToolsMismatch=0
     44ignoreBuildToolsMismatch=no
     45mismatchBTExternals=
    4546bumpMajor=0
    4647suppressCheckout=0
     
    8283    case "$1" in
    8384      -h* | --h*) printHelp=1 ;;
    84       -i* | --i*) ignoreBuildToolsMismatch=1 ;;
     85      -i* | --i*)
     86           if expr "$1" : '.*-i.*=.*' 2>&1 >/dev/null ; then
     87             mismatchBTExternals=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'`
     88           else
     89             shift
     90             mismatchBTExternals=$1
     91           fi
     92           if test "x$mismatchBTExternals" = "xall" ; then
     93             ignoreBuildToolsMismatch=all
     94           else
     95             ignoreBuildToolsMismatch=partial
     96           fi
     97           ;;
    8598      -m* | --m*) bumpMajor=1 ;;
    8699      -p* | --p*) suppressCheckout=1 ;;
     
    215228  -b <BuildToolsURL>    URL for BuildTools; required to generate a release
    216229                        for a ThirdParty or Data project.
    217   -i                    Ignore BuildTools version mismatches in externals.
     230  -i <projectlist>      Ignore BuildTools version mismatches for the listed
     231                        externals (comma-separated list of project names,
     232                        e.g., -i Osi,Cbc). '-i all' ignores all mismatches.
    218233  -p                    Suppress checkout (useful for testing)
    219234  -m                    Bump the major version number.
    220235  -t <project-list>     Suppress conversion from trunk to stable for the
    221236                        listed externals (comma-separated list of project
    222                         names, e.g., -t Osi,Cbc).
     237                        names).
    223238  -x <project-list>     Remove the listed projects from the list of externals
    224239                        (comma-separated list of project names).
     
    503518          testResult=`compareURLVersions "$srcBTURL" "$extBTURL"`
    504519          if test $testResult = no ; then
    505             echo "    WARNING: BuildTools mismatch: $ext_url_notail uses $extBTURL"
    506             if test $ignoreBuildToolsMismatch = 0 ; then
    507                buildtoolsMismatch=1
     520            if test $ignoreBuildToolsMismatch = all || \
     521               expr "$mismatchBTExternals" : '.*'$ext_proj'.*' 2>&1 >/dev/null ; then
     522              echo "    WARNING: BuildTools mismatch: $ext_url_notail uses $extBTURL"
     523            else
     524              buildtoolsMismatch=1
     525              echo "    ERROR: BuildTools mismatch: $ext_url_notail uses $extBTURL"
    508526            fi
    509527          fi
     
    517535  done
    518536
    519 # If we have a BuildTools mismatch, and mismatch is not permitted, exit.
    520 
    521   if test $buildtoolsMismatch -gt $ignoreBuildToolsMismatch ; then
     537# If we have a BuildTools mismatch, exit.
     538
     539  if test $buildtoolsMismatch = 1 ; then
    522540    echo "Exiting due to BuildTools mismatches; use -i to ignore."
    523541    exit 2
     
    526544  $cmdDir/set_externals Dependencies
    527545
     546# Try three times to check out externals before conceding defeat.
     547
    528548  echo ''
    529549  echo '===> Checking out externals ...'
    530550  echo ''
    531551
    532   svn update
     552  svn update ||
     553  { echo "Retry 1 ... " ; svn update ; } ||
     554  { echo "Retry 2 ... " ; svn update ; } ||
     555  { echo "Checkout of externals failed. Aborting." ; exit 3 ; }
    533556
    534557# Run any scripts to acquire ThirdParty code.
Note: See TracChangeset for help on using the changeset viewer.