Skip to contentSkip to conversation

main/runqueue: Add --setscene-only option to bitbake

PATCH New Richard Purdie 1 participant 1 message Jan 8, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 main/runqueue: Add --setscene-only option to bitbake

Its turning out that we really need a way to have bitbake just run the setscene tasks but not any real tasks, particularly for SDK operations.

Add an option for this since its pretty straight forward. This allows various nasty workarounds in OE-Core to be removed.

bitbake/lib/bb/cookerdata.py +1 -0
index b47e7f3..9f40674 100644
@@ -137,6 +137,7 @@ class CookerConfiguration(object):
         self.force = False
         self.profile = False
         self.nosetscene = False
+        self.setsceneonly = False
         self.invalidate_stamp = False
         self.dump_signatures = []
         self.dry_run = False
bitbake/lib/bb/main.py +3 -0
index c0ae38a..bf59793 100755
@@ -219,6 +219,9 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
         parser.add_option("", "--no-setscene", help = "Do not run any setscene tasks. sstate will be ignored and everything needed, built.",
                    action = "store_true", dest = "nosetscene", default = False)
 
+        parser.add_option("", "--setscene-only", help = "Only run setscene tasks, don't run any real tasks.",
+                   action = "store_true", dest = "setsceneonly", default = False)
+
         parser.add_option("", "--remote-server", help = "Connect to the specified server.",
                    action = "store", dest = "remote_server", default = False)
 
bitbake/lib/bb/runqueue.py +6 -3
index ee06f0e..da7059b 100644
@@ -1077,9 +1077,12 @@ class RunQueue:
             retval = self.rqexe.execute()
 
         if self.state is runQueueRunInit:
-            logger.info("Executing RunQueue Tasks")
-            self.rqexe = RunQueueExecuteTasks(self)
-            self.state = runQueueRunning
+            if self.cooker.configuration.setsceneonly:
+                self.state = runQueueComplete
+            else:
+                logger.info("Executing RunQueue Tasks")
+                self.rqexe = RunQueueExecuteTasks(self)
+                self.state = runQueueRunning
 
         if self.state is runQueueRunning:
             retval = self.rqexe.execute()