| Index: scripts/slave/bot_update.py
|
| diff --git a/scripts/slave/bot_update.py b/scripts/slave/bot_update.py
|
| index c5db40b27ed683b43905da57cf7fc08e9cb018bf..1a2e5974c9b4f7ffd237ee1fb8032cf15b71151d 100755
|
| --- a/scripts/slave/bot_update.py
|
| +++ b/scripts/slave/bot_update.py
|
| @@ -42,9 +42,25 @@ THIS_DIR = path.dirname(path.abspath(__file__))
|
| SCRIPTS_DIR = path.dirname(THIS_DIR)
|
| BUILD_DIR = path.dirname(SCRIPTS_DIR)
|
| ROOT_DIR = path.dirname(BUILD_DIR)
|
| -BUILD_INTERNAL_DIR = path.join(ROOT_DIR, 'build_internal')
|
| DEPOT_TOOLS_DIR = path.join(ROOT_DIR, 'depot_tools')
|
|
|
| +# TODO(luqui): This is a horrible hack to identify build_internal when build
|
| +# is a recipe dependency. bot_update should not be depending on internal,
|
| +# rather the arrow should go the other way (or just be destroyed).
|
| +def check_build_internal(d):
|
| + d = path.abspath(d)
|
| + if path.basename(d) == 'build_internal' and path.isdir(d):
|
| + return d
|
| + else:
|
| + return None
|
| +
|
| +BUILD_INTERNAL_DIR = (
|
| + check_build_internal(path.join(ROOT_DIR, 'build_internal')) or
|
| + check_build_internal(path.join(ROOT_DIR, # .recipe_deps
|
| + path.pardir, # slave
|
| + path.pardir, # scripts
|
| + path.pardir))) # build_internal
|
| +
|
|
|
| CHROMIUM_GIT_HOST = 'https://chromium.googlesource.com'
|
| CHROMIUM_SRC_URL = CHROMIUM_GIT_HOST + '/chromium/src.git'
|
| @@ -187,7 +203,7 @@ cache_dir = r%(cache_dir)s
|
|
|
|
|
| internal_data = {}
|
| -if os.path.isdir(BUILD_INTERNAL_DIR):
|
| +if BUILD_INTERNAL_DIR:
|
| local_vars = {}
|
| try:
|
| execfile(os.path.join(
|
| @@ -316,7 +332,12 @@ if sys.platform.startswith('win'):
|
|
|
| # Find the patch tool.
|
| if sys.platform.startswith('win'):
|
| - PATCH_TOOL = path.join(BUILD_INTERNAL_DIR, 'tools', 'patch.EXE')
|
| + if not BUILD_INTERNAL_DIR:
|
| + print 'Warning: could not find patch tool because there is no '
|
| + print 'build_internal present.'
|
| + PATCH_TOOL = None
|
| + else:
|
| + PATCH_TOOL = path.join(BUILD_INTERNAL_DIR, 'tools', 'patch.EXE')
|
| else:
|
| PATCH_TOOL = '/usr/bin/patch'
|
|
|
|
|