From 25331bfed5960b4ca33fe8fec7ff7150f237946e Mon Sep 17 00:00:00 2001 From: recipe-roller Date: Fri, 17 May 2019 20:49:29 +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/9f95903cb308192351026428275ba8dc4f6e4378 Set non-buffered mode for recipes.py and catch Ctrl-C. (iannucci@chromium.org) TBR=iannucci@chromium.org Recipe-Tryjob-Bypass-Reason: Autoroller Bugdroid-Send-Email: False Change-Id: I0fb5538d09a01f07d42b45604fa0c3812a742dc8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1618086 Reviewed-by: Recipe Roller Commit-Queue: Recipe Roller --- infra/config/recipes.cfg | 2 +- recipes/README.recipes.md | 32 ++++++++++++++++---------------- recipes/recipes.py | 25 +++++++++++++++++-------- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg index 0ac94c46f..b7493271a 100644 --- a/infra/config/recipes.cfg +++ b/infra/config/recipes.cfg @@ -15,7 +15,7 @@ "deps": { "recipe_engine": { "branch": "master", - "revision": "0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af", + "revision": "9f95903cb308192351026428275ba8dc4f6e4378", "url": "https://chromium.googlesource.com/infra/luci/recipes-py.git" } }, diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 39011eeae..9d8af751d 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -997,19 +997,19 @@ 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/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-buildbucket -[recipe_engine/recipe_modules/cipd]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-cipd -[recipe_engine/recipe_modules/commit_position]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-commit_position -[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-context -[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-file -[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-json -[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-path -[recipe_engine/recipe_modules/platform]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-platform -[recipe_engine/recipe_modules/properties]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-properties -[recipe_engine/recipe_modules/python]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-python -[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-raw_io -[recipe_engine/recipe_modules/runtime]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-runtime -[recipe_engine/recipe_modules/source_manifest]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-source_manifest -[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-step -[recipe_engine/recipe_modules/url]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/README.recipes.md#recipe_modules-url -[recipe_engine/wkt/RecipeApi]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/0d245ab9614f86baeaf26dfe69f5cbe9feb4e8af/recipe_engine/recipe_api.py#836 +[recipe_engine/recipe_modules/buildbucket]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-buildbucket +[recipe_engine/recipe_modules/cipd]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-cipd +[recipe_engine/recipe_modules/commit_position]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-commit_position +[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-context +[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-file +[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-json +[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-path +[recipe_engine/recipe_modules/platform]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-platform +[recipe_engine/recipe_modules/properties]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-properties +[recipe_engine/recipe_modules/python]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-python +[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-raw_io +[recipe_engine/recipe_modules/runtime]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-runtime +[recipe_engine/recipe_modules/source_manifest]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-source_manifest +[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-step +[recipe_engine/recipe_modules/url]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/README.recipes.md#recipe_modules-url +[recipe_engine/wkt/RecipeApi]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/9f95903cb308192351026428275ba8dc4f6e4378/recipe_engine/recipe_api.py#836 diff --git a/recipes/recipes.py b/recipes/recipes.py index 2fe008622..e21456b53 100755 --- a/recipes/recipes.py +++ b/recipes/recipes.py @@ -1,4 +1,13 @@ -#!/usr/bin/env python +#!/bin/sh +# We want to run python in unbuffered mode; however shebangs on linux grab the +# entire rest of the shebang line as a single argument, leading to errors like: +# +# /usr/bin/env: 'python -u': No such file or directory +# +# This little shell hack is a triple-quoted noop in python, but in sh it +# evaluates to re-exec'ing this script in unbuffered mode. +''''exec python -u -- "$0" ${1+"$@"} # ''' +# vi: syntax=python # Copyright 2017 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 @@ -14,20 +23,17 @@ This is a copy of https://chromium.googlesource.com/infra/luci/recipes-py/+/mast To fix bugs, fix in the googlesource repo then run the autoroller. """ +# pylint: disable=wrong-import-position import argparse import json import logging import os -import random import subprocess import sys -import time import urlparse from collections import namedtuple -from cStringIO import StringIO - # The dependency entry for the recipe_engine in the client repo's recipes.cfg # # url (str) - the url to the engine repo we want to use. @@ -219,9 +225,12 @@ def main(): engine_path = checkout_engine(engine_override, repo_root, recipes_cfg_path) - return _subprocess_call([ - VPYTHON, '-u', - os.path.join(engine_path, 'recipe_engine', 'main.py')] + args) + try: + return _subprocess_call([ + VPYTHON, '-u', + os.path.join(engine_path, 'recipe_engine', 'main.py')] + args) + except KeyboardInterrupt: + return 1 if __name__ == '__main__':