summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2014-06-18 12:00:22 +0200
committerAndoni Morales Alastruey <ylatuya@gmail.com>2014-06-18 12:00:22 +0200
commita47ea1f4aca566551813631787cb9e956b10a51b (patch)
tree13527d81fcddcb5f61e00554aff95830aa23bf4e
parentb7a5df6f0021bc70a7a788fefc47ee36368a4235 (diff)
Revert "build: Add a way to specify a list of mandatory steps to execute"
-rw-r--r--cerbero/build/oven.py8
-rw-r--r--cerbero/commands/build.py18
2 files changed, 7 insertions, 19 deletions
diff --git a/cerbero/build/oven.py b/cerbero/build/oven.py
index 1925e031..9e55114c 100644
--- a/cerbero/build/oven.py
+++ b/cerbero/build/oven.py
@@ -62,7 +62,7 @@ class Oven (object):
STEP_TPL = '[(%s/%s) %s -> %s ]'
def __init__(self, recipes, cookbook, force=False, no_deps=False,
- missing_files=False, dry_run=False, wanted_steps=[]):
+ missing_files=False, dry_run=False):
if isinstance(recipes, Recipe):
recipes = [recipes]
self.recipes = recipes
@@ -71,7 +71,6 @@ class Oven (object):
self.no_deps = no_deps
self.missing_files = missing_files
self.config = cookbook.get_config()
- self.wanted_steps = wanted_steps
self.interactive = self.config.interactive
shell.DRY_RUN = dry_run
@@ -120,7 +119,7 @@ class Oven (object):
def _cook_recipe(self, recipe, count, total):
if not self.cookbook.recipe_needs_build(recipe.name) and \
- not self.force and not self.wanted_steps:
+ not self.force:
m.build_step(count, total, recipe.name, _("already built"))
return
@@ -132,8 +131,7 @@ class Oven (object):
for desc, step in recipe.steps:
m.build_step(count, total, recipe.name, step)
# check if the current step needs to be done
- if self.cookbook.step_done(recipe.name, step) and not self.force and \
- not step in self.wanted_steps:
+ if self.cookbook.step_done(recipe.name, step) and not self.force:
m.action(_("Step done"))
continue
try:
diff --git a/cerbero/commands/build.py b/cerbero/commands/build.py
index 1988abe8..a0c62f93 100644
--- a/cerbero/commands/build.py
+++ b/cerbero/commands/build.py
@@ -28,7 +28,7 @@ class Build(Command):
doc = N_('Build a recipe')
name = 'build'
- def __init__(self, force=None, no_deps=None, wanted_steps=[]):
+ def __init__(self, force=None, no_deps=None):
args = [
ArgparseArgument('recipe', nargs='*',
help=_('name of the recipe to build')),
@@ -51,15 +51,7 @@ class Build(Command):
default=False,
help=_('do not build dependencies')))
- if not wanted_steps:
- args.append(
- ArgparseArgument('--wanted-steps', default='',
- help=_('Steps to force execution when building even if stated as'
- 'done in the current cached state. Its is a list'
- 'of step name separated by ;')))
-
self.force = force
- self.wanted_steps = wanted_steps
self.no_deps = no_deps
Command.__init__(self, args)
@@ -68,19 +60,17 @@ class Build(Command):
self.force = args.force
if self.no_deps is None:
self.no_deps = args.no_deps
- if not self.wanted_steps:
- self.wanted_steps = args.wanted_steps.split(':')
self.runargs(config, args.recipe, args.missing_files, self.force,
- self.no_deps, dry_run=args.dry_run, wanted_steps=self.wanted_steps)
+ self.no_deps, dry_run=args.dry_run)
def runargs(self, config, recipes, missing_files=False, force=False,
- no_deps=False, cookbook=None, dry_run=False, wanted_steps=[]):
+ no_deps=False, cookbook=None, dry_run=False):
if cookbook is None:
cookbook = CookBook(config)
oven = Oven(recipes, cookbook, force=self.force,
no_deps=self.no_deps, missing_files=missing_files,
- dry_run=dry_run, wanted_steps=wanted_steps)
+ dry_run=dry_run)
oven.start_cooking()