Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: recipe_engine/package.py

Issue 1861203002: Make recipes.py run give better messages. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: LICENSE and small things. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | recipe_engine/run.py » ('j') | recipe_engine/run.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/package.py
diff --git a/recipe_engine/package.py b/recipe_engine/package.py
index 7a77718ad4402335da14af50e9a0f251d9f339c7..43b0e9d813aaff01373c0793c81b3802a5bd5640 100644
--- a/recipe_engine/package.py
+++ b/recipe_engine/package.py
@@ -354,18 +354,22 @@ class Package(object):
This is accessed by loader.py through RecipeDeps.get_package.
"""
- def __init__(self, name, repo_spec, deps, repo_root, recipes_dir):
+ def __init__(self, name, repo_spec, deps, repo_root, relative_recipes_dir):
self.name = name
self.repo_spec = repo_spec
self.deps = deps
self.repo_root = repo_root
- self.recipes_dir = recipes_dir
+ self.relative_recipes_dir = relative_recipes_dir
def __repr__(self):
return '<Package(name=%r,repo_spec=%r,deps=%r,recipes_dir=%r)>' % (
self.name, self.repo_spec, self.deps, self.recipes_dir)
@property
+ def recipes_dir(self):
+ return os.path.join(self.repo_root, self.relative_recipes_dir)
+
+ @property
def recipe_dirs(self):
return [os.path.join(self.recipes_dir, 'recipes')]
@@ -385,14 +389,6 @@ class Package(object):
def module_path(self, module_name):
return os.path.join(self.recipes_dir, 'recipe_modules', module_name)
- def loop_over_recipe_modules():
martiniss 2016/04/06 00:27:43 Derp.
- for path in self.module_dirs:
- if os.path.isdir(path):
- for item in os.listdir(path):
- subpath = os.path.join(path, item)
- if _is_recipe_module_dir(subpath):
- yield subpath
-
def __repr__(self):
return 'Package(%r, %r, %r, %r)' % (
self.name, self.repo_spec, self.deps, self.recipe_dirs)
@@ -624,8 +620,7 @@ class PackageDeps(object):
package = Package(
project_id, repo_spec, deps,
repo_spec.repo_root(self._context),
- os.path.join(repo_spec.repo_root(self._context),
- package_spec.recipes_path))
+ package_spec.recipes_path)
self._packages[project_id] = package
return package
« no previous file with comments | « no previous file | recipe_engine/run.py » ('j') | recipe_engine/run.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698