From 2d608f837d51c900dacadeb9737fbde068578d8a Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Fri, 15 Jul 2011 10:30:48 -0700 Subject: ui/hob: switch from buildFile to buildTargets for custom image builds We need to use the buildTargets command to ensure dependencies, such as native tools to build the rootfs, are correctly included. This patch achieves this by modifying BBPATH and BBFILES to include matches for the location of the generated recipe file and reparsing the metadata before calling buildTargets. Fixes [YOCTO #1228] (Bitbake rev: 5840d59098141e773c12bea8ed8d9f4f1a706132) Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/configurator.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'bitbake/lib/bb/ui/crumbs/configurator.py') diff --git a/bitbake/lib/bb/ui/crumbs/configurator.py b/bitbake/lib/bb/ui/crumbs/configurator.py index 6481608483..ec48a4f3f0 100644 --- a/bitbake/lib/bb/ui/crumbs/configurator.py +++ b/bitbake/lib/bb/ui/crumbs/configurator.py @@ -244,6 +244,24 @@ class Configurator(gobject.GObject): del self.orig_config self.orig_config = copy.deepcopy(self.config) + def insertTempBBPath(self, bbpath, bbfiles): + # Create a backup of the local.conf + bkup = "%s~" % self.local + os.rename(self.local, bkup) + + # read the original conf into a list + with open(bkup, 'r') as config: + config_lines = config.readlines() + + if bbpath: + config_lines.append("BBPATH := \"${BBPATH}:%s\"\n" % bbpath) + if bbfiles: + config_lines.append("BBFILES := \"${BBFILES} %s\"\n" % bbfiles) + + # Write the updated lines list object to the local.conf + with open(self.local, "w") as n: + n.write("".join(config_lines)) + def writeLayerConf(self): # If we've not added/removed new layers don't write if not self._isLayerConfDirty(): -- cgit v1.2.3-54-g00ecf