diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/configurator.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/configurator.py | 18 |
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(): |