]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: bitbake: Add --skip-setscene option
authorJoshua Watt <jpewhacker@gmail.com>
Mon, 1 Jul 2019 18:22:23 +0000 (13:22 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 3 Jul 2019 16:00:57 +0000 (17:00 +0100)
Adds an option to skip _setscene only if they would normally be
executed, without ignoring sstate completely.

Previously, '--no-setscene' would allow a build that completely ignored
sstate and _setscene tasks, and '--setscene-only' would allow a build
that only ran _setscene tasks, but there was no option do a build that
would respect tasks previously restored from sstate and build everything
else. Now one can run:

 bitbake --setscene-only IMAGE; bitbake --skip-setscene IMAGE

which is functionally equivalent to:

 bitbake IMAGE

The indented use is to allow a build to complete successfully in the
presence of _setscene task failures by splitting apart the two phases
e.g.:

 (bitbake -k --setscene-only IMAGE || true) && bitbake --skip-setscene IMAGE

(Bitbake rev: 813ba5b7c13b573a0b813b628a819bdbf0627540)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/cookerdata.py
bitbake/lib/bb/main.py
bitbake/lib/bb/runqueue.py

index e64c6c527171dc2999ed0cc7cceaee4f6613db95..144e803b4f4d8ac15e90d8ab73f0a9810dde620e 100644 (file)
@@ -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
index 3071141b55f71ccc042be5a60946277f1e1327dd..af2880f8d58364d1b383d59fad3575d0b6a5dba0 100755 (executable)
@@ -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.")
index 58707db3097d4be2db1e778dd0ff9983bd5b8a45..704e309b931f35d1f0aff54c14cbc1c8b1be94e5 100644 (file)
@@ -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)