| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The LUCI Authors. All rights reserved. | 2 # Copyright 2015 The LUCI Authors. All rights reserved. |
| 3 # Use of this source code is governed under the Apache License, Version 2.0 | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
| 4 # that can be found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
| 5 | 5 |
| 6 """Tool to interact with recipe repositories. | 6 """Tool to interact with recipe repositories. |
| 7 | 7 |
| 8 This tool operates on the nearest ancestor directory containing an | 8 This tool operates on the nearest ancestor directory containing an |
| 9 infra/config/recipes.cfg. | 9 infra/config/recipes.cfg. |
| 10 """ | 10 """ |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 depgraph.main(universe, package_deps.root_package, | 197 depgraph.main(universe, package_deps.root_package, |
| 198 args.ignore_package, args.output, args.recipe_filter) | 198 args.ignore_package, args.output, args.recipe_filter) |
| 199 | 199 |
| 200 | 200 |
| 201 def doc(package_deps, args): | 201 def doc(package_deps, args): |
| 202 from recipe_engine import doc | 202 from recipe_engine import doc |
| 203 from recipe_engine import loader | 203 from recipe_engine import loader |
| 204 | 204 |
| 205 _, config_file = get_package_config(args) | 205 _, config_file = get_package_config(args) |
| 206 universe = loader.RecipeUniverse(package_deps, config_file) | 206 universe = loader.RecipeUniverse(package_deps, config_file) |
| 207 universe_view = loader.UniverseView(universe, package_deps.root_package) |
| 207 | 208 |
| 208 doc.main(universe) | 209 doc.main(universe_view) |
| 209 | 210 |
| 210 | 211 |
| 211 def info(args): | 212 def info(args): |
| 212 from recipe_engine import package | 213 from recipe_engine import package |
| 213 repo_root, config_file = get_package_config(args) | 214 repo_root, config_file = get_package_config(args) |
| 214 package_spec = package.PackageSpec.load_proto(config_file) | 215 package_spec = package.PackageSpec.load_proto(config_file) |
| 215 | 216 |
| 216 if args.recipes_dir: | 217 if args.recipes_dir: |
| 217 print package_spec.recipes_path | 218 print package_spec.recipes_path |
| 218 | 219 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 ret = main() | 428 ret = main() |
| 428 if not isinstance(ret, int): | 429 if not isinstance(ret, int): |
| 429 if ret is None: | 430 if ret is None: |
| 430 ret = 0 | 431 ret = 0 |
| 431 else: | 432 else: |
| 432 print >> sys.stderr, ret | 433 print >> sys.stderr, ret |
| 433 ret = 1 | 434 ret = 1 |
| 434 sys.stdout.flush() | 435 sys.stdout.flush() |
| 435 sys.stderr.flush() | 436 sys.stderr.flush() |
| 436 os._exit(ret) | 437 os._exit(ret) |
| OLD | NEW |