summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/configurator.py
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-07-15 10:30:48 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-26 20:15:47 +0100
commit2d608f837d51c900dacadeb9737fbde068578d8a (patch)
treea56305cb5cc6e7ce1438c0c74b85728d834ac169 /bitbake/lib/bb/ui/crumbs/configurator.py
parent6d76379af89aafb3757d60bc67b96c6f65ca8455 (diff)
downloadpoky-2d608f837d51c900dacadeb9737fbde068578d8a.tar.gz
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 <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/configurator.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/configurator.py18
1 files changed, 18 insertions, 0 deletions
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):
244 del self.orig_config 244 del self.orig_config
245 self.orig_config = copy.deepcopy(self.config) 245 self.orig_config = copy.deepcopy(self.config)
246 246
247 def insertTempBBPath(self, bbpath, bbfiles):
248 # Create a backup of the local.conf
249 bkup = "%s~" % self.local
250 os.rename(self.local, bkup)
251
252 # read the original conf into a list
253 with open(bkup, 'r') as config:
254 config_lines = config.readlines()
255
256 if bbpath:
257 config_lines.append("BBPATH := \"${BBPATH}:%s\"\n" % bbpath)
258 if bbfiles:
259 config_lines.append("BBFILES := \"${BBFILES} %s\"\n" % bbfiles)
260
261 # Write the updated lines list object to the local.conf
262 with open(self.local, "w") as n:
263 n.write("".join(config_lines))
264
247 def writeLayerConf(self): 265 def writeLayerConf(self):
248 # If we've not added/removed new layers don't write 266 # If we've not added/removed new layers don't write
249 if not self._isLayerConfDirty(): 267 if not self._isLayerConfDirty():