depot_tools: adjust for resource API changes in recipe engine

This is rolling in https://codereview.chromium.org/1777003003

BUG=593420

Review URL: https://codereview.chromium.org/1785443002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299187 0039d316-1c4b-4281-b951-d872f2087c98
parent 8159374e
...@@ -5,5 +5,5 @@ deps { ...@@ -5,5 +5,5 @@ deps {
project_id: "recipe_engine" project_id: "recipe_engine"
url: "https://chromium.googlesource.com/external/github.com/luci/recipes-py.git" url: "https://chromium.googlesource.com/external/github.com/luci/recipes-py.git"
branch: "master" branch: "master"
revision: "7d340be42c48a91e90e0cf6245b4d647b14dbf40" revision: "b8903bd90521b8e3ed14b875dc9b8779263fc37c"
} }
...@@ -60,7 +60,7 @@ class BotUpdateApi(recipe_api.RecipeApi): ...@@ -60,7 +60,7 @@ class BotUpdateApi(recipe_api.RecipeApi):
kwargs.setdefault('env', {}) kwargs.setdefault('env', {})
kwargs['env'].setdefault('PATH', '%(PATH)s') kwargs['env'].setdefault('PATH', '%(PATH)s')
kwargs['env']['PATH'] = self.m.path.pathsep.join([ kwargs['env']['PATH'] = self.m.path.pathsep.join([
kwargs['env']['PATH'], str(self._module.PACKAGE_DIRECTORY)]) kwargs['env']['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
return self.m.python(name, bot_update_path, cmd, **kwargs) return self.m.python(name, bot_update_path, cmd, **kwargs)
@property @property
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update (without patch)", "name": "bot_update (without patch)",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update - with branch heads", "name": "bot_update - with branch heads",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "bot_update", "name": "bot_update",
"~followup_annotations": [ "~followup_annotations": [
......
...@@ -7,4 +7,4 @@ from recipe_engine import recipe_api ...@@ -7,4 +7,4 @@ from recipe_engine import recipe_api
class DepotToolsApi(recipe_api.RecipeApi): class DepotToolsApi(recipe_api.RecipeApi):
@property @property
def download_from_google_storage_path(self): def download_from_google_storage_path(self):
return self.package_resource('download_from_google_storage.py') return self.package_repo_resource('download_from_google_storage.py')
...@@ -93,10 +93,10 @@ class GclientApi(recipe_api.RecipeApi): ...@@ -93,10 +93,10 @@ class GclientApi(recipe_api.RecipeApi):
kwargs.setdefault('env', {}) kwargs.setdefault('env', {})
kwargs['env'].setdefault('PATH', '%(PATH)s') kwargs['env'].setdefault('PATH', '%(PATH)s')
kwargs['env']['PATH'] = self.m.path.pathsep.join([ kwargs['env']['PATH'] = self.m.path.pathsep.join([
kwargs['env']['PATH'], str(self._module.PACKAGE_DIRECTORY)]) kwargs['env']['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
return self.m.python(prefix + name, return self.m.python(prefix + name,
self.package_resource('gclient.py'), self.package_repo_resource('gclient.py'),
cmd, cmd,
infra_step=infra_step, infra_step=infra_step,
**kwargs) **kwargs)
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"config", "config",
"--spec", "--spec",
"cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]" "cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient setup" "name": "gclient setup"
}, },
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"sync", "sync",
"--verbose", "--verbose",
"--with_branch_heads", "--with_branch_heads",
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient sync", "name": "gclient sync",
"~followup_annotations": [ "~followup_annotations": [
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"recurse", "recurse",
"git", "git",
"config", "config",
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient recurse (git config user.name)" "name": "gclient recurse (git config user.name)"
}, },
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"recurse", "recurse",
"git", "git",
"config", "config",
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient recurse (git config user.email)" "name": "gclient recurse (git config user.email)"
}, },
...@@ -86,14 +86,14 @@ ...@@ -86,14 +86,14 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"config", "config",
"--spec", "--spec",
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]" "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]"
], ],
"cwd": "[SLAVE_BUILD]/src/third_party", "cwd": "[SLAVE_BUILD]/src/third_party",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "[spec: WebKit] gclient setup" "name": "[spec: WebKit] gclient setup"
}, },
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"sync", "sync",
"--nohooks", "--nohooks",
"--force", "--force",
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
], ],
"cwd": "[SLAVE_BUILD]/src/third_party", "cwd": "[SLAVE_BUILD]/src/third_party",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "[spec: WebKit] gclient sync", "name": "[spec: WebKit] gclient sync",
"~followup_annotations": [ "~followup_annotations": [
...@@ -161,12 +161,12 @@ ...@@ -161,12 +161,12 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"runhooks" "runhooks"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient runhooks" "name": "gclient runhooks"
}, },
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"config", "config",
"--spec", "--spec",
"cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]" "cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient setup" "name": "gclient setup"
}, },
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"sync", "sync",
"--verbose", "--verbose",
"--with_branch_heads", "--with_branch_heads",
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient sync", "name": "gclient sync",
"~followup_annotations": [ "~followup_annotations": [
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"recurse", "recurse",
"git", "git",
"config", "config",
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient recurse (git config user.name)" "name": "gclient recurse (git config user.name)"
}, },
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"recurse", "recurse",
"git", "git",
"config", "config",
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient recurse (git config user.email)" "name": "gclient recurse (git config user.email)"
}, },
...@@ -88,14 +88,14 @@ ...@@ -88,14 +88,14 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"config", "config",
"--spec", "--spec",
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]" "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]"
], ],
"cwd": "[SLAVE_BUILD]/src/third_party", "cwd": "[SLAVE_BUILD]/src/third_party",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "[spec: WebKit] gclient setup" "name": "[spec: WebKit] gclient setup"
}, },
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"sync", "sync",
"--nohooks", "--nohooks",
"--force", "--force",
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
], ],
"cwd": "[SLAVE_BUILD]/src/third_party", "cwd": "[SLAVE_BUILD]/src/third_party",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "[spec: WebKit] gclient sync", "name": "[spec: WebKit] gclient sync",
"~followup_annotations": [ "~followup_annotations": [
...@@ -163,12 +163,12 @@ ...@@ -163,12 +163,12 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"runhooks" "runhooks"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient runhooks" "name": "gclient runhooks"
}, },
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"config", "config",
"--spec", "--spec",
"cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]" "cache_dir = '[ROOT]/git_cache'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient setup" "name": "gclient setup"
}, },
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"sync", "sync",
"--verbose", "--verbose",
"--with_branch_heads", "--with_branch_heads",
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient sync", "name": "gclient sync",
"~followup_annotations": [ "~followup_annotations": [
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"recurse", "recurse",
"git", "git",
"config", "config",
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient recurse (git config user.name)" "name": "gclient recurse (git config user.name)"
}, },
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"recurse", "recurse",
"git", "git",
"config", "config",
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient recurse (git config user.email)" "name": "gclient recurse (git config user.email)"
}, },
...@@ -88,14 +88,14 @@ ...@@ -88,14 +88,14 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"config", "config",
"--spec", "--spec",
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]" "cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': 'DEPS', 'managed': True, 'name': 'WebKit', 'safesync_url': 'https://blink-status.appspot.com/lkgr', 'url': 'svn://svn.chromium.org/blink/trunk'}]"
], ],
"cwd": "[SLAVE_BUILD]/src/third_party", "cwd": "[SLAVE_BUILD]/src/third_party",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "[spec: WebKit] gclient setup" "name": "[spec: WebKit] gclient setup"
}, },
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"sync", "sync",
"--nohooks", "--nohooks",
"--force", "--force",
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
], ],
"cwd": "[SLAVE_BUILD]/src/third_party", "cwd": "[SLAVE_BUILD]/src/third_party",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "[spec: WebKit] gclient sync", "name": "[spec: WebKit] gclient sync",
"~followup_annotations": [ "~followup_annotations": [
...@@ -174,12 +174,12 @@ ...@@ -174,12 +174,12 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/gclient.py", "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
"runhooks" "runhooks"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "gclient runhooks" "name": "gclient runhooks"
}, },
......
...@@ -23,7 +23,7 @@ class GitApi(recipe_api.RecipeApi): ...@@ -23,7 +23,7 @@ class GitApi(recipe_api.RecipeApi):
git_cmd = ['git'] git_cmd = ['git']
if self.m.platform.is_win: if self.m.platform.is_win:
self.ensure_win_git_tooling() self.ensure_win_git_tooling()
git_cmd = [self.package_resource('git.bat')] git_cmd = [self.package_repo_resource('git.bat')]
options = kwargs.pop('git_config_options', {}) options = kwargs.pop('git_config_options', {})
for k, v in sorted(options.iteritems()): for k, v in sorted(options.iteritems()):
git_cmd.extend(['-c', '%s=%s' % (k, v)]) git_cmd.extend(['-c', '%s=%s' % (k, v)])
...@@ -43,9 +43,9 @@ class GitApi(recipe_api.RecipeApi): ...@@ -43,9 +43,9 @@ class GitApi(recipe_api.RecipeApi):
return return
self.m.step( self.m.step(
'ensure git tooling on windows', 'ensure git tooling on windows',
[self.package_resource('bootstrap', 'win', 'win_tools.bat')], [self.package_repo_resource('bootstrap', 'win', 'win_tools.bat')],
infra_step=True, infra_step=True,
cwd=self.package_resource()) cwd=self.package_repo_resource())
self.initialized_win_git = True self.initialized_win_git = True
def fetch_tags(self, remote_name=None, **kwargs): def fetch_tags(self, remote_name=None, **kwargs):
...@@ -189,7 +189,8 @@ class GitApi(recipe_api.RecipeApi): ...@@ -189,7 +189,8 @@ class GitApi(recipe_api.RecipeApi):
if self.m.platform.is_win: if self.m.platform.is_win:
self.ensure_win_git_tooling() self.ensure_win_git_tooling()
git_setup_args += ['--git_cmd_path', self.package_resource('git.bat')] git_setup_args += [
'--git_cmd_path', self.package_repo_resource('git.bat')]
step_suffix = '' if step_suffix is None else ' (%s)' % step_suffix step_suffix = '' if step_suffix is None else ' (%s)' % step_suffix
self.m.python( self.m.python(
......
[ [
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\bootstrap\\win\\win_tools.bat" "RECIPE_PACKAGE_REPO[depot_tools]\\bootstrap\\win\\win_tools.bat"
], ],
"cwd": "RECIPE_PACKAGE[depot_tools]", "cwd": "RECIPE_PACKAGE_REPO[depot_tools]",
"name": "ensure git tooling on windows" "name": "ensure git tooling on windows"
}, },
{ {
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
"--url", "--url",
"https://chromium.googlesource.com/chromium/src.git", "https://chromium.googlesource.com/chromium/src.git",
"--git_cmd_path", "--git_cmd_path",
"RECIPE_PACKAGE[depot_tools]\\git.bat" "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"name": "git setup" "name": "git setup"
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"retry", "retry",
"fetch", "fetch",
"origin", "origin",
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"checkout", "checkout",
"-f", "-f",
"FETCH_HEAD" "FETCH_HEAD"
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"rev-parse", "rev-parse",
"HEAD" "HEAD"
], ],
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"clean", "clean",
"-f", "-f",
"-d", "-d",
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"submodule", "submodule",
"sync" "sync"
], ],
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"submodule", "submodule",
"update", "update",
"--init", "--init",
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"-c", "-c",
"foo=bar", "foo=bar",
"count-objects", "count-objects",
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"config", "config",
"--get", "--get",
"remote.origin.url" "remote.origin.url"
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"show", "show",
"HEAD", "HEAD",
"--format=%at", "--format=%at",
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"fetch", "fetch",
"origin", "origin",
"--tags" "--tags"
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"status" "status"
], ],
"cwd": "[SLAVE_BUILD]\\src", "cwd": "[SLAVE_BUILD]\\src",
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"status" "status"
], ],
"cwd": "[SLAVE_BUILD]\\src", "cwd": "[SLAVE_BUILD]\\src",
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"status" "status"
], ],
"cwd": "[SLAVE_BUILD]\\src", "cwd": "[SLAVE_BUILD]\\src",
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"rebase", "rebase",
"origin/master" "origin/master"
], ],
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"bundle", "bundle",
"create", "create",
"[SLAVE_BUILD]\\all.bundle", "[SLAVE_BUILD]\\all.bundle",
......
...@@ -13,8 +13,8 @@ class PresubmitApi(recipe_api.RecipeApi): ...@@ -13,8 +13,8 @@ class PresubmitApi(recipe_api.RecipeApi):
kwargs.setdefault('env', {}) kwargs.setdefault('env', {})
kwargs['env'].setdefault('PATH', '%(PATH)s') kwargs['env'].setdefault('PATH', '%(PATH)s')
kwargs['env']['PATH'] = self.m.path.pathsep.join([ kwargs['env']['PATH'] = self.m.path.pathsep.join([
kwargs['env']['PATH'], str(self._module.PACKAGE_DIRECTORY)]) kwargs['env']['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
return self.m.python( return self.m.python(
name, self.package_resource('presubmit_support.py'), list(args), name, self.package_repo_resource('presubmit_support.py'), list(args),
**kwargs) **kwargs)
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
"cmd": [ "cmd": [
"python", "python",
"-u", "-u",
"RECIPE_PACKAGE[depot_tools]/presubmit_support.py" "RECIPE_PACKAGE_REPO[depot_tools]/presubmit_support.py"
], ],
"cwd": "[SLAVE_BUILD]", "cwd": "[SLAVE_BUILD]",
"env": { "env": {
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]" "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
}, },
"name": "presubmit" "name": "presubmit"
}, },
......
[ [
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\bootstrap\\win\\win_tools.bat" "RECIPE_PACKAGE_REPO[depot_tools]\\bootstrap\\win\\win_tools.bat"
], ],
"cwd": "RECIPE_PACKAGE[depot_tools]", "cwd": "RECIPE_PACKAGE_REPO[depot_tools]",
"name": "ensure git tooling on windows" "name": "ensure git tooling on windows"
}, },
{ {
"cmd": [ "cmd": [
"RECIPE_PACKAGE[depot_tools]\\git.bat", "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
"diff", "diff",
"--cached", "--cached",
"--name-only" "--name-only"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment