From d1dba6482b227c3509df61e01b62644be329e0aa Mon Sep 17 00:00:00 2001 From: recipe-roller Date: Wed, 16 Jan 2019 23:03:30 +0000 Subject: [PATCH] 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/ed32454c59ca7ba6d05f313f32f75c1b8157d66e Remove unused features of package.proto. (iannucci@chromium.org) TBR=iannucci@chromium.org Recipe-Tryjob-Bypass-Reason: Autoroller Bugdroid-Send-Email: False Change-Id: Ia5ca69de1e13209c336bcc82d52f2aa508551569 Reviewed-on: https://chromium-review.googlesource.com/c/1416057 Reviewed-by: Recipe Roller Commit-Queue: Recipe Roller --- infra/config/recipes.cfg | 2 +- recipes/README.recipes.md | 30 +++++++++++++++--------------- recipes/recipes.py | 29 +++++++---------------------- 3 files changed, 23 insertions(+), 38 deletions(-) diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg index 7ba4ce37e..25dbc6280 100644 --- a/infra/config/recipes.cfg +++ b/infra/config/recipes.cfg @@ -15,7 +15,7 @@ "deps": { "recipe_engine": { "branch": "master", - "revision": "b5365db8a7bac60b839af22029317e97bd2e77b4", + "revision": "ed32454c59ca7ba6d05f313f32f75c1b8157d66e", "url": "https://chromium.googlesource.com/infra/luci/recipes-py.git" } }, diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index f7991b006..25af4b2ab 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -975,18 +975,18 @@ Move things around in a loop! — **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/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-buildbucket -[recipe_engine/recipe_modules/cipd]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-cipd -[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-context -[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-file -[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-json -[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-path -[recipe_engine/recipe_modules/platform]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-platform -[recipe_engine/recipe_modules/properties]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-properties -[recipe_engine/recipe_modules/python]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-python -[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-raw_io -[recipe_engine/recipe_modules/runtime]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-runtime -[recipe_engine/recipe_modules/source_manifest]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-source_manifest -[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-step -[recipe_engine/recipe_modules/url]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/README.recipes.md#recipe_modules-url -[recipe_engine/wkt/RecipeApi]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b5365db8a7bac60b839af22029317e97bd2e77b4/recipe_engine/recipe_api.py#1005 +[recipe_engine/recipe_modules/buildbucket]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-buildbucket +[recipe_engine/recipe_modules/cipd]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-cipd +[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-context +[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-file +[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-json +[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-path +[recipe_engine/recipe_modules/platform]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-platform +[recipe_engine/recipe_modules/properties]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-properties +[recipe_engine/recipe_modules/python]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-python +[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-raw_io +[recipe_engine/recipe_modules/runtime]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-runtime +[recipe_engine/recipe_modules/source_manifest]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-source_manifest +[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-step +[recipe_engine/recipe_modules/url]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/README.recipes.md#recipe_modules-url +[recipe_engine/wkt/RecipeApi]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/ed32454c59ca7ba6d05f313f32f75c1b8157d66e/recipe_engine/recipe_api.py#1005 diff --git a/recipes/recipes.py b/recipes/recipes.py index 04fb9c902..114821da7 100755 --- a/recipes/recipes.py +++ b/recipes/recipes.py @@ -32,16 +32,10 @@ from cStringIO import StringIO # # url (str) - the url to the engine repo we want to use. # revision (str) - the git revision for the engine to get. -# path_override (str) - the subdirectory in the engine repo we should use to -# find it's recipes.py entrypoint. This is here for completeness, but will -# essentially always be empty. It would be used if the recipes-py repo was -# merged as a subdirectory of some other repo and you depended on that -# subdirectory. # branch (str) - the branch to fetch for the engine as an absolute ref (e.g. # refs/heads/master) -# repo_type ("GIT"|"GITILES") - An ignored enum which will be removed soon. EngineDep = namedtuple('EngineDep', - 'url revision path_override branch repo_type') + 'url revision branch') class MalformedRecipesCfg(Exception): @@ -86,7 +80,6 @@ def parse(repo_root, recipes_cfg_path): recipes_cfg_path) engine.setdefault('revision', '') - engine.setdefault('path_override', '') engine.setdefault('branch', 'refs/heads/master') recipes_path = pb.get('recipes_path', '') @@ -94,12 +87,6 @@ def parse(repo_root, recipes_cfg_path): if not engine['branch'].startswith('refs/'): engine['branch'] = 'refs/heads/' + engine['branch'] - engine.setdefault('repo_type', 'GIT') - if engine['repo_type'] not in ('GIT', 'GITILES'): - raise MalformedRecipesCfg( - 'Unsupported "repo_type" value in dependency "recipe_engine"', - recipes_cfg_path) - recipes_path = os.path.join( repo_root, recipes_path.replace('/', os.path.sep)) return EngineDep(**engine), recipes_path @@ -160,28 +147,26 @@ def checkout_engine(engine_path, repo_root, recipes_cfg_path): if not engine_path: revision = dep.revision - subpath = dep.path_override branch = dep.branch # Ensure that we have the recipe engine cloned. - engine = os.path.join(recipes_path, '.recipe_deps', 'recipe_engine') - engine_path = os.path.join(engine, subpath) + engine_path = os.path.join(recipes_path, '.recipe_deps', 'recipe_engine') with open(os.devnull, 'w') as NUL: # Note: this logic mirrors the logic in recipe_engine/fetch.py - _git_check_call(['init', engine], stdout=NUL) + _git_check_call(['init', engine_path], stdout=NUL) try: _git_check_call(['rev-parse', '--verify', '%s^{commit}' % revision], - cwd=engine, stdout=NUL, stderr=NUL) + cwd=engine_path, stdout=NUL, stderr=NUL) except subprocess.CalledProcessError: - _git_check_call(['fetch', url, branch], cwd=engine, stdout=NUL, + _git_check_call(['fetch', url, branch], cwd=engine_path, stdout=NUL, stderr=NUL) try: - _git_check_call(['diff', '--quiet', revision], cwd=engine) + _git_check_call(['diff', '--quiet', revision], cwd=engine_path) except subprocess.CalledProcessError: - _git_check_call(['reset', '-q', '--hard', revision], cwd=engine) + _git_check_call(['reset', '-q', '--hard', revision], cwd=engine_path) return engine_path