Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(640)

Unified Diff: scripts/slave/bot_update.py

Issue 1241323004: Cross-repo recipe package system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Roll to latest recipes-py Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/slave/annotated_run.py ('k') | scripts/slave/recipe_modules/chromium_android/api.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'
« no previous file with comments | « scripts/slave/annotated_run.py ('k') | scripts/slave/recipe_modules/chromium_android/api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698