Browse Source

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
phajdan.jr@chromium.org 9 years ago
parent
commit
88e173be1a
28 changed files with 93 additions and 92 deletions
  1. 1 1
      infra/config/recipes.cfg
  2. 1 1
      recipe_modules/bot_update/api.py
  3. 1 1
      recipe_modules/bot_update/example.expected/basic.json
  4. 1 1
      recipe_modules/bot_update/example.expected/basic_output_manifest.json
  5. 1 1
      recipe_modules/bot_update/example.expected/basic_with_branch_heads.json
  6. 1 1
      recipe_modules/bot_update/example.expected/clobber.json
  7. 1 1
      recipe_modules/bot_update/example.expected/forced.json
  8. 1 1
      recipe_modules/bot_update/example.expected/no_shallow.json
  9. 1 1
      recipe_modules/bot_update/example.expected/off.json
  10. 1 1
      recipe_modules/bot_update/example.expected/reset_root_solution_revision.json
  11. 1 1
      recipe_modules/bot_update/example.expected/svn_mode.json
  12. 1 1
      recipe_modules/bot_update/example.expected/trychange.json
  13. 1 1
      recipe_modules/bot_update/example.expected/trychange_oauth2.json
  14. 1 1
      recipe_modules/bot_update/example.expected/tryjob.json
  15. 1 1
      recipe_modules/bot_update/example.expected/tryjob_fail.json
  16. 1 1
      recipe_modules/bot_update/example.expected/tryjob_fail_patch.json
  17. 1 1
      recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json
  18. 1 1
      recipe_modules/bot_update/example.expected/tryjob_v8.json
  19. 1 1
      recipe_modules/depot_tools/api.py
  20. 2 2
      recipe_modules/gclient/api.py
  21. 14 14
      recipe_modules/gclient/example.expected/basic.json
  22. 14 14
      recipe_modules/gclient/example.expected/revision.json
  23. 14 14
      recipe_modules/gclient/example.expected/tryserver.json
  24. 5 4
      recipe_modules/git/api.py
  25. 18 18
      recipe_modules/git/example.expected/platform_win.json
  26. 2 2
      recipe_modules/presubmit/api.py
  27. 2 2
      recipe_modules/presubmit/example.expected/basic.json
  28. 3 3
      recipe_modules/tryserver/example.expected/with_wrong_patch.json

+ 1 - 1
infra/config/recipes.cfg

@@ -5,5 +5,5 @@ deps {
   project_id: "recipe_engine"
   url: "https://chromium.googlesource.com/external/github.com/luci/recipes-py.git"
   branch: "master"
-  revision: "7d340be42c48a91e90e0cf6245b4d647b14dbf40"
+  revision: "b8903bd90521b8e3ed14b875dc9b8779263fc37c"
 }

+ 1 - 1
recipe_modules/bot_update/api.py

@@ -60,7 +60,7 @@ class BotUpdateApi(recipe_api.RecipeApi):
     kwargs.setdefault('env', {})
     kwargs['env'].setdefault('PATH', '%(PATH)s')
     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)
 
   @property

+ 1 - 1
recipe_modules/bot_update/example.expected/basic.json

@@ -25,7 +25,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update (without patch)",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/basic_output_manifest.json

@@ -26,7 +26,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/basic_with_branch_heads.json

@@ -26,7 +26,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update - with branch heads",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/clobber.json

@@ -26,7 +26,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/forced.json

@@ -26,7 +26,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/no_shallow.json

@@ -26,7 +26,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/off.json

@@ -25,7 +25,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/reset_root_solution_revision.json

@@ -25,7 +25,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/svn_mode.json

@@ -26,7 +26,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/trychange.json

@@ -27,7 +27,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/trychange_oauth2.json

@@ -29,7 +29,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/tryjob.json

@@ -27,7 +27,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/tryjob_fail.json

@@ -27,7 +27,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/tryjob_fail_patch.json

@@ -27,7 +27,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json

@@ -27,7 +27,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/bot_update/example.expected/tryjob_v8.json

@@ -29,7 +29,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "bot_update",
     "~followup_annotations": [

+ 1 - 1
recipe_modules/depot_tools/api.py

@@ -7,4 +7,4 @@ from recipe_engine import recipe_api
 class DepotToolsApi(recipe_api.RecipeApi):
   @property
   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')

+ 2 - 2
recipe_modules/gclient/api.py

@@ -93,10 +93,10 @@ class GclientApi(recipe_api.RecipeApi):
     kwargs.setdefault('env', {})
     kwargs['env'].setdefault('PATH', '%(PATH)s')
     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,
-                         self.package_resource('gclient.py'),
+                         self.package_repo_resource('gclient.py'),
                          cmd,
                          infra_step=infra_step,
                          **kwargs)

+ 14 - 14
recipe_modules/gclient/example.expected/basic.json

@@ -3,14 +3,14 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "config",
       "--spec",
       "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]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient setup"
   },
@@ -18,7 +18,7 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "sync",
       "--verbose",
       "--with_branch_heads",
@@ -34,7 +34,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient sync",
     "~followup_annotations": [
@@ -52,7 +52,7 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "recurse",
       "git",
       "config",
@@ -61,7 +61,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient recurse (git config user.name)"
   },
@@ -69,7 +69,7 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "recurse",
       "git",
       "config",
@@ -78,7 +78,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient recurse (git config user.email)"
   },
@@ -86,14 +86,14 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "config",
       "--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'}]"
     ],
     "cwd": "[SLAVE_BUILD]/src/third_party",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "[spec: WebKit] gclient setup"
   },
@@ -101,7 +101,7 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "sync",
       "--nohooks",
       "--force",
@@ -115,7 +115,7 @@
     ],
     "cwd": "[SLAVE_BUILD]/src/third_party",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "[spec: WebKit] gclient sync",
     "~followup_annotations": [
@@ -161,12 +161,12 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "runhooks"
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient runhooks"
   },

+ 14 - 14
recipe_modules/gclient/example.expected/revision.json

@@ -3,14 +3,14 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "config",
       "--spec",
       "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]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient setup"
   },
@@ -18,7 +18,7 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "sync",
       "--verbose",
       "--with_branch_heads",
@@ -36,7 +36,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient sync",
     "~followup_annotations": [
@@ -54,7 +54,7 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "recurse",
       "git",
       "config",
@@ -63,7 +63,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient recurse (git config user.name)"
   },
@@ -71,7 +71,7 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "recurse",
       "git",
       "config",
@@ -80,7 +80,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient recurse (git config user.email)"
   },
@@ -88,14 +88,14 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "config",
       "--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'}]"
     ],
     "cwd": "[SLAVE_BUILD]/src/third_party",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "[spec: WebKit] gclient setup"
   },
@@ -103,7 +103,7 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "sync",
       "--nohooks",
       "--force",
@@ -117,7 +117,7 @@
     ],
     "cwd": "[SLAVE_BUILD]/src/third_party",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "[spec: WebKit] gclient sync",
     "~followup_annotations": [
@@ -163,12 +163,12 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "runhooks"
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient runhooks"
   },

+ 14 - 14
recipe_modules/gclient/example.expected/tryserver.json

@@ -3,14 +3,14 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "config",
       "--spec",
       "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]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient setup"
   },
@@ -18,7 +18,7 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "sync",
       "--verbose",
       "--with_branch_heads",
@@ -36,7 +36,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient sync",
     "~followup_annotations": [
@@ -54,7 +54,7 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "recurse",
       "git",
       "config",
@@ -63,7 +63,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient recurse (git config user.name)"
   },
@@ -71,7 +71,7 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "recurse",
       "git",
       "config",
@@ -80,7 +80,7 @@
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient recurse (git config user.email)"
   },
@@ -88,14 +88,14 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "config",
       "--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'}]"
     ],
     "cwd": "[SLAVE_BUILD]/src/third_party",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "[spec: WebKit] gclient setup"
   },
@@ -114,7 +114,7 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "sync",
       "--nohooks",
       "--force",
@@ -128,7 +128,7 @@
     ],
     "cwd": "[SLAVE_BUILD]/src/third_party",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "[spec: WebKit] gclient sync",
     "~followup_annotations": [
@@ -174,12 +174,12 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/gclient.py",
+      "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
       "runhooks"
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "gclient runhooks"
   },

+ 5 - 4
recipe_modules/git/api.py

@@ -23,7 +23,7 @@ class GitApi(recipe_api.RecipeApi):
     git_cmd = ['git']
     if self.m.platform.is_win:
       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', {})
     for k, v in sorted(options.iteritems()):
       git_cmd.extend(['-c', '%s=%s' % (k, v)])
@@ -43,9 +43,9 @@ class GitApi(recipe_api.RecipeApi):
       return
     self.m.step(
         '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,
-        cwd=self.package_resource())
+        cwd=self.package_repo_resource())
     self.initialized_win_git = True
 
   def fetch_tags(self, remote_name=None, **kwargs):
@@ -189,7 +189,8 @@ class GitApi(recipe_api.RecipeApi):
 
     if self.m.platform.is_win:
       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
     self.m.python(

+ 18 - 18
recipe_modules/git/example.expected/platform_win.json

@@ -1,9 +1,9 @@
 [
   {
     "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"
   },
   {
@@ -16,14 +16,14 @@
       "--url",
       "https://chromium.googlesource.com/chromium/src.git",
       "--git_cmd_path",
-      "RECIPE_PACKAGE[depot_tools]\\git.bat"
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat"
     ],
     "cwd": "[SLAVE_BUILD]",
     "name": "git setup"
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "retry",
       "fetch",
       "origin",
@@ -35,7 +35,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "checkout",
       "-f",
       "FETCH_HEAD"
@@ -45,7 +45,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "rev-parse",
       "HEAD"
     ],
@@ -58,7 +58,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "clean",
       "-f",
       "-d",
@@ -69,7 +69,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "submodule",
       "sync"
     ],
@@ -78,7 +78,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "submodule",
       "update",
       "--init",
@@ -89,7 +89,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "-c",
       "foo=bar",
       "count-objects",
@@ -101,7 +101,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "config",
       "--get",
       "remote.origin.url"
@@ -115,7 +115,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "show",
       "HEAD",
       "--format=%at",
@@ -127,7 +127,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "fetch",
       "origin",
       "--tags"
@@ -137,7 +137,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "status"
     ],
     "cwd": "[SLAVE_BUILD]\\src",
@@ -145,7 +145,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "status"
     ],
     "cwd": "[SLAVE_BUILD]\\src",
@@ -153,7 +153,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "status"
     ],
     "cwd": "[SLAVE_BUILD]\\src",
@@ -161,7 +161,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "rebase",
       "origin/master"
     ],
@@ -170,7 +170,7 @@
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "bundle",
       "create",
       "[SLAVE_BUILD]\\all.bundle",

+ 2 - 2
recipe_modules/presubmit/api.py

@@ -13,8 +13,8 @@ class PresubmitApi(recipe_api.RecipeApi):
     kwargs.setdefault('env', {})
     kwargs['env'].setdefault('PATH', '%(PATH)s')
     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, self.package_resource('presubmit_support.py'), list(args),
+        name, self.package_repo_resource('presubmit_support.py'), list(args),
         **kwargs)

+ 2 - 2
recipe_modules/presubmit/example.expected/basic.json

@@ -3,11 +3,11 @@
     "cmd": [
       "python",
       "-u",
-      "RECIPE_PACKAGE[depot_tools]/presubmit_support.py"
+      "RECIPE_PACKAGE_REPO[depot_tools]/presubmit_support.py"
     ],
     "cwd": "[SLAVE_BUILD]",
     "env": {
-      "PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
+      "PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
     },
     "name": "presubmit"
   },

+ 3 - 3
recipe_modules/tryserver/example.expected/with_wrong_patch.json

@@ -1,14 +1,14 @@
 [
   {
     "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"
   },
   {
     "cmd": [
-      "RECIPE_PACKAGE[depot_tools]\\git.bat",
+      "RECIPE_PACKAGE_REPO[depot_tools]\\git.bat",
       "diff",
       "--cached",
       "--name-only"