summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2013-05-12 12:43:39 (GMT)
committerAndoni Morales Alastruey <ylatuya@gmail.com>2013-05-27 08:02:39 (GMT)
commitb6adfcc23627269f903cf7268c33501d921ceb5f (patch)
tree2f3fdb61214ca1c83b8ac6b3ef7f30cb8b726e89
parent28437ec54ff0977a24106769a53ffceaecdec4f5 (diff)
downloadcerbero-b6adfcc23627269f903cf7268c33501d921ceb5f.tar.gz
cerbero-b6adfcc23627269f903cf7268c33501d921ceb5f.tar.xz
build: add a new field for runtime dependencies
Some recipes like gettext, libiconv or mingw's runtime are a dependency for almost all of the other recipes.
-rw-r--r--cerbero/build/cookbook.py8
-rw-r--r--cerbero/build/recipe.py3
2 files changed, 10 insertions, 1 deletions
diff --git a/cerbero/build/cookbook.py b/cerbero/build/cookbook.py
index 5212851..89a41e6 100644
--- a/cerbero/build/cookbook.py
+++ b/cerbero/build/cookbook.py
@@ -236,6 +236,9 @@ class CookBook (object):
recipe = self.get_recipe(recipe_name)
return self._find_deps(recipe, {}, [])
+ def _runtime_deps (self):
+ return [x.name for x in self.recipes.values() if x.runtime_dep]
+
def _cache_file(self, config):
if config.cache_file is not None:
return os.path.join(CONFIG_DIR, config.cache_file)
@@ -266,7 +269,10 @@ class CookBook (object):
if state.get(recipe, 'clean') == 'in-progress':
raise FatalError(_("Dependency Cycle"))
state[recipe] = 'in-progress'
- for recipe_name in recipe.list_deps():
+ recipe_deps = recipe.list_deps()
+ if not recipe.runtime_dep:
+ recipe_deps = self._runtime_deps () + recipe_deps
+ for recipe_name in recipe_deps:
try:
recipedep = self.get_recipe(recipe_name)
except RecipeNotFoundError, e:
diff --git a/cerbero/build/recipe.py b/cerbero/build/recipe.py
index b6d27c7..530fb29 100644
--- a/cerbero/build/recipe.py
+++ b/cerbero/build/recipe.py
@@ -105,6 +105,8 @@ class Recipe(FilesProvider):
@type deps: list
@cvar platform_deps: platform conditional depencies
@type platform_deps: dict
+ @cvar runtime_dep: runtime dep common to all recipes
+ @type runtime_dep: bool
'''
__metaclass__ = MetaRecipe
@@ -119,6 +121,7 @@ class Recipe(FilesProvider):
deps = list()
platform_deps = {}
force = False
+ runtime_dep = False
_default_steps = BuildSteps()
def __init__(self, config):