Skip to contentSkip to conversation

toaster: write variables to toaster.conf

PATCH In review Ed Bartosh 2 participants 2 messages Jan 18, 2016 – Jan 19, 2016

lore
Share & tools
lore

Ed Bartosh

author
#0 lore raw

PATCH 1/1 toaster: write variables to toaster.conf

With the resent change in rootfs creation code setVariable rpc calls don't set variables for bitbake workers anymore.

Writen variables to toaster.conf should solve this issue.

[YOCTO #8910]

---
 bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 7 +++++++
 1 file changed, 7 insertions(+)
bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +7 -0
index 4f6f15c..2215d7af2 100644
@@ -280,6 +280,13 @@ class LocalhostBEController(BuildEnvironmentController):
         # set up the build environment with the needed layers
         self.setLayers(bitbake, layers, targets)
 
+        # write configuration file
+        filepath = os.path.join(self.be.builddir, "conf/toaster.conf")
+        with open(filepath, 'w') as conf:
+            for var in variables:
+                conf.write('%s="%s"\n' % (var.name, var.value))
+            conf.write('INHERIT+="toaster buildhistory"')
+
         # get the bb server running with the build req id and build env id
         bbctrl = self.getBBController()
 
Signature · 1 line
2.1.4
#1 lore raw
Quoted 3 lines · Ed Bartosh

With the resent change in rootfs creation code setVariable rpc calls don't set variables for bitbake workers anymore.

Sent to bitbake-devel and added to toaster-next.

Elliot

Quoted 39 lines

Writen variables to toaster.conf should solve this issue.

[YOCTO #8910]

---
 bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 7 +++++++
 1 file changed, 7 insertions(+)
bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +0 -0
index 4f6f15c..2215d7af2 100644
@@ -280,6 +280,13 @@ class

LocalhostBEController(BuildEnvironmentController):

         # set up the build environment with the needed layers
         self.setLayers(bitbake, layers, targets)
bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +7 -1
+        # write configuration file
+        filepath = os.path.join(self.be.builddir, "conf/toaster.conf")
+        with open(filepath, 'w') as conf:
+            for var in variables:
+                conf.write('%s="%s"\n' % (var.name, var.value))
+            conf.write('INHERIT+="toaster buildhistory"')
+
         # get the bb server running with the build req id and build env id
         bbctrl = self.getBBController()
 
--

2.1.4

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Signature · 3 lines
Elliot Smith
Software Engineer
Intel Open Source Technology Centre