summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-07-22 11:32:27 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-25 12:54:15 +0100
commit9cf5190679f372da212cbbbf85e27b9ea6a395f4 (patch)
tree1f6fc661ad01e1c1af9f06fa2819a81162841e5f /bitbake
parent52e0be44e068b53959d9566516486b758be718dc (diff)
downloadpoky-9cf5190679f372da212cbbbf85e27b9ea6a395f4.tar.gz
hob: only add new layer's to the UI
If a user added the same layer more than once the underlying bblayers.conf file would not have multiple entries but the UI would show an entry for the layer for each time it was added. This patch changes the Configurator to return None values if the layer wasn't added to bblayers.conf and the LayerEditor to only update the UI if non-None values are returned. Fixes [YOCTO #1275] (Bitbake rev: 9c59baa4da3c863ebc412a56ffd8dbd7a8ffeb60) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/crumbs/configurator.py4
-rw-r--r--bitbake/lib/bb/ui/crumbs/layereditor.py5
2 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/configurator.py b/bitbake/lib/bb/ui/crumbs/configurator.py
index 551179950a..e7c524afce 100644
--- a/bitbake/lib/bb/ui/crumbs/configurator.py
+++ b/bitbake/lib/bb/ui/crumbs/configurator.py
@@ -139,7 +139,9 @@ class Configurator(gobject.GObject):
139 name = self._getLayerName(layerpath) 139 name = self._getLayerName(layerpath)
140 if name not in self.enabled_layers: 140 if name not in self.enabled_layers:
141 self.addLayer(name, layerpath) 141 self.addLayer(name, layerpath)
142 return name, layerpath 142 return name, layerpath
143 else:
144 return None, None
143 145
144 def addLayer(self, name, path): 146 def addLayer(self, name, path):
145 self.enabled_layers[name] = path 147 self.enabled_layers[name] = path
diff --git a/bitbake/lib/bb/ui/crumbs/layereditor.py b/bitbake/lib/bb/ui/crumbs/layereditor.py
index 76a2eb536f..7c581d642f 100644
--- a/bitbake/lib/bb/ui/crumbs/layereditor.py
+++ b/bitbake/lib/bb/ui/crumbs/layereditor.py
@@ -132,5 +132,6 @@ class LayerEditor(gtk.Dialog):
132 # FIXME: verify we've actually got a layer conf? 132 # FIXME: verify we've actually got a layer conf?
133 if path.endswith(".conf"): 133 if path.endswith(".conf"):
134 name, layerpath = self.configurator.addLayerConf(path) 134 name, layerpath = self.configurator.addLayerConf(path)
135 self.newly_added[name] = layerpath 135 if name:
136 self.layer_store.append([name, layerpath, True]) 136 self.newly_added[name] = layerpath
137 self.layer_store.append([name, layerpath, True])