Commit 515b1546 authored by recipe-roller's avatar recipe-roller Committed by Commit Bot

Roll recipe dependencies (trivial).

This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
recipe_engine:
  https://crrev.com/c923df1b4ecf75345768d71a09e0ce17fd21c9aa Autoformat recipes.py with yapf chromium style (olivernewman@google.com)


TBR=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ib79e3c918e8e87038f367a7d0f91528a1d35e3a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1625569Reviewed-by: 's avatarRecipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
parent 7a614338
......@@ -15,7 +15,7 @@
"deps": {
"recipe_engine": {
"branch": "master",
"revision": "bae937d72f6b21b53a3218efdb0471861a332c0c",
"revision": "c923df1b4ecf75345768d71a09e0ce17fd21c9aa",
"url": "https://chromium.googlesource.com/infra/luci/recipes-py.git"
}
},
......
......@@ -997,19 +997,19 @@ Move things around in a loop!
&mdash; **def [RunSteps](/recipes/recipe_modules/windows_sdk/examples/full.py#13)(api):**
[recipe_engine/recipe_modules/buildbucket]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-buildbucket
[recipe_engine/recipe_modules/cipd]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-cipd
[recipe_engine/recipe_modules/commit_position]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-commit_position
[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-context
[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-file
[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-json
[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-path
[recipe_engine/recipe_modules/platform]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-platform
[recipe_engine/recipe_modules/properties]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-properties
[recipe_engine/recipe_modules/python]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-python
[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-raw_io
[recipe_engine/recipe_modules/runtime]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-runtime
[recipe_engine/recipe_modules/source_manifest]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-source_manifest
[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-step
[recipe_engine/recipe_modules/url]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/README.recipes.md#recipe_modules-url
[recipe_engine/wkt/RecipeApi]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/bae937d72f6b21b53a3218efdb0471861a332c0c/recipe_engine/recipe_api.py#836
[recipe_engine/recipe_modules/buildbucket]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-buildbucket
[recipe_engine/recipe_modules/cipd]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-cipd
[recipe_engine/recipe_modules/commit_position]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-commit_position
[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-context
[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-file
[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-json
[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-path
[recipe_engine/recipe_modules/platform]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-platform
[recipe_engine/recipe_modules/properties]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-properties
[recipe_engine/recipe_modules/python]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-python
[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-raw_io
[recipe_engine/recipe_modules/runtime]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-runtime
[recipe_engine/recipe_modules/source_manifest]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-source_manifest
[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-step
[recipe_engine/recipe_modules/url]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/README.recipes.md#recipe_modules-url
[recipe_engine/wkt/RecipeApi]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/c923df1b4ecf75345768d71a09e0ce17fd21c9aa/recipe_engine/recipe_api.py#836
......@@ -13,7 +13,6 @@
# pylint: disable=pointless-string-statement
''''exec python -u -- "$0" ${1+"$@"} # '''
# vi: syntax=python
"""Bootstrap script to clone and forward to the recipe engine tool.
*******************
......@@ -41,14 +40,14 @@ from collections import namedtuple
# revision (str) - the git revision for the engine to get.
# branch (str) - the branch to fetch for the engine as an absolute ref (e.g.
# refs/heads/master)
EngineDep = namedtuple('EngineDep',
'url revision branch')
EngineDep = namedtuple('EngineDep', 'url revision branch')
class MalformedRecipesCfg(Exception):
def __init__(self, msg, path):
super(MalformedRecipesCfg, self).__init__('malformed recipes.cfg: %s: %r'
% (msg, path))
full_message = 'malformed recipes.cfg: %s: %r' % (msg, path)
super(MalformedRecipesCfg, self).__init__(full_message)
def parse(repo_root, recipes_cfg_path):
......@@ -97,8 +96,8 @@ def parse(repo_root, recipes_cfg_path):
if not engine['branch'].startswith('refs/'):
engine['branch'] = 'refs/heads/' + engine['branch']
recipes_path = os.path.join(
repo_root, recipes_path.replace('/', os.path.sep))
recipes_path = os.path.join(repo_root,
recipes_path.replace('/', os.path.sep))
return EngineDep(**engine), recipes_path
except KeyError as ex:
raise MalformedRecipesCfg(ex.message, recipes_cfg_path)
......@@ -114,6 +113,7 @@ REQUIRED_BINARIES = {GIT, VPYTHON, CIPD}
def _is_executable(path):
return os.path.isfile(path) and os.access(path, os.X_OK)
# TODO: Use shutil.which once we switch to Python3.
def _is_on_path(basename):
for path in os.environ['PATH'].split(os.pathsep):
......@@ -129,13 +129,13 @@ def _subprocess_call(argv, **kwargs):
def _git_check_call(argv, **kwargs):
argv = [GIT]+argv
argv = [GIT] + argv
logging.info('Running %r', argv)
subprocess.check_call(argv, **kwargs)
def _git_output(argv, **kwargs):
argv = [GIT]+argv
argv = [GIT] + argv
logging.info('Running %r', argv)
return subprocess.check_output(argv, **kwargs)
......@@ -181,10 +181,15 @@ def checkout_engine(engine_path, repo_root, recipes_cfg_path):
_git_check_call(['init', engine_path], stdout=NUL)
try:
_git_check_call(['rev-parse', '--verify', '%s^{commit}' % revision],
cwd=engine_path, stdout=NUL, stderr=NUL)
_git_check_call(['rev-parse', '--verify',
'%s^{commit}' % revision],
cwd=engine_path,
stdout=NUL,
stderr=NUL)
except subprocess.CalledProcessError:
_git_check_call(['fetch', url, branch], cwd=engine_path, stdout=NUL,
_git_check_call(['fetch', url, branch],
cwd=engine_path,
stdout=NUL,
stderr=NUL)
try:
......@@ -213,12 +218,11 @@ def main():
if recipes_cfg_path:
# calculate repo_root from recipes_cfg_path
repo_root = os.path.dirname(
os.path.dirname(
os.path.dirname(recipes_cfg_path)))
os.path.dirname(os.path.dirname(recipes_cfg_path)))
else:
# find repo_root with git and calculate recipes_cfg_path
repo_root = (_git_output(
['rev-parse', '--show-toplevel'],
repo_root = (
_git_output(['rev-parse', '--show-toplevel'],
cwd=os.path.abspath(os.path.dirname(__file__))).strip())
repo_root = os.path.abspath(repo_root)
recipes_cfg_path = os.path.join(repo_root, 'infra', 'config', 'recipes.cfg')
......@@ -227,8 +231,8 @@ def main():
engine_path = checkout_engine(engine_override, repo_root, recipes_cfg_path)
try:
return _subprocess_call([
VPYTHON, '-u',
return _subprocess_call(
[VPYTHON, '-u',
os.path.join(engine_path, 'recipe_engine', 'main.py')] + args)
except KeyboardInterrupt:
return 1
......
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