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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.