diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index e64c6c5271..144e803b4f 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py @@ -121,6 +121,7 @@ class CookerConfiguration(object): self.profile = False self.nosetscene = False self.setsceneonly = False + self.skipsetscene = False self.invalidate_stamp = False self.dump_signatures = [] self.dry_run = False diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py index 3071141b55..af2880f8d5 100755 --- a/bitbake/lib/bb/main.py +++ b/bitbake/lib/bb/main.py @@ -254,6 +254,11 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters): help="Do not run any setscene tasks. sstate will be ignored and " "everything needed, built.") + parser.add_option("", "--skip-setscene", action="store_true", + dest="skipsetscene", default=False, + help="Skip setscene tasks if they would be executed. Tasks previously " + "restored from sstate will be kept, unlike --no-setscene") + parser.add_option("", "--setscene-only", action="store_true", dest="setsceneonly", default=False, help="Only run setscene tasks, don't run any real tasks.") diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 58707db309..704e309b93 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -2488,6 +2488,11 @@ class RunQueueExecuteScenequeue(RunQueueExecute): self.task_skip(task) return True + if self.cooker.configuration.skipsetscene: + logger.debug(2, 'No setscene tasks should be executed. Skipping %s', task) + self.task_failoutright(task) + return True + startevent = sceneQueueTaskStarted(task, self.stats, self.rq) bb.event.fire(startevent, self.cfgData)