From 8e89fa3ddeee245d804e9c8ee243b8230b8ee1cc Mon Sep 17 00:00:00 2001 From: Robert Iannucci Date: Tue, 14 Mar 2017 15:49:02 -0700 Subject: [PATCH] Manually roll recipes. recipe_engine: https://crrev.com/222e52d54fd4816863099034b25b6f74e0e1a06a [package.proto] upgrade to proto3. (iannucci@chromium.org) https://crrev.com/70340d7caa58896cbcffcccbc5573dd3b488fc5d [doc/recipes.py] proto3 omits empty fields. (iannucci@chromium.org) https://crrev.com/286c6f5ec8db26ee88eae1bd30855a9f3d0cf426 [doc/recipes.py] protobuf is a dict of lists. (iannucci@chromium.org) https://crrev.com/78c57c5d69a38ef3db86d9763d539383f98714e6 [doc/recipes.py] Make recipes.py 80-cols. (iannucci@chromium.org) BUG= Change-Id: I4c5c9e94e9c64d14ccf0048f1aa392148b5f01c8 Reviewed-on: https://chromium-review.googlesource.com/454888 Commit-Queue: Robbie Iannucci Reviewed-by: Daniel Jacques --- infra/config/recipes.cfg | 3 +-- recipes.py | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg index 3c3d997d9..382f4f9ad 100644 --- a/infra/config/recipes.cfg +++ b/infra/config/recipes.cfg @@ -1,9 +1,8 @@ api_version: 1 project_id: "depot_tools" -recipes_path: "" deps { project_id: "recipe_engine" url: "https://chromium.googlesource.com/external/github.com/luci/recipes-py.git" branch: "master" - revision: "9fdd6d725d8d04125d43ce2be4f5e4b123f705be" + revision: "78c57c5d69a38ef3db86d9763d539383f98714e6" } diff --git a/recipes.py b/recipes.py index 3e0041420..b944b0a05 100755 --- a/recipes.py +++ b/recipes.py @@ -150,14 +150,15 @@ def main(): protobuf = parse_protobuf(fh) engine_buf = get_unique([ - b for b in protobuf['deps'] if b.get('project_id') == ['recipe_engine'] ]) + b for b in protobuf.get('deps', []) + if b.get('project_id') == ['recipe_engine'] ]) engine_url = get_unique(engine_buf['url']) engine_revision = get_unique(engine_buf['revision']) engine_subpath = (get_unique(engine_buf.get('path_override', [''])) .replace('/', os.path.sep)) recipes_path = os.path.join(repo_root, - get_unique(protobuf['recipes_path']).replace('/', os.path.sep)) + get_unique(protobuf.get('recipes_path', [''])).replace('/', os.path.sep)) deps_path = os.path.join(recipes_path, '.recipe_deps') engine_path = find_engine_override(sys.argv[1:]) if not engine_path: