[bitbake-devel] [PATCH 02/14] Hob: Fix adding duplicated meta-hob layer

Dongxiao Xu dongxiao.xu at intel.com
Thu Mar 29 12:01:08 UTC 2012


While adding meta-hob layer, we need to detect whether it already
exists in current layers.

Signed-off-by: Dongxiao Xu <dongxiao.xu at intel.com>
---
 lib/bb/ui/crumbs/hobeventhandler.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index f189553..1cbb027 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -383,7 +383,9 @@ class HobHandler(gobject.GObject):
         params = {}
         params["core_base"] = self.server.runCommand(["getVariable", "COREBASE"]) or ""
         hob_layer = params["core_base"] + "/meta-hob"
-        params["layer"] = (self.server.runCommand(["getVariable", "BBLAYERS"]) or "") + " " + hob_layer
+        params["layer"] = self.server.runCommand(["getVariable", "BBLAYERS"]) or ""
+        if hob_layer not in params["layer"].split():
+            params["layer"] += (" " + hob_layer)
         params["dldir"] = self.server.runCommand(["getVariable", "DL_DIR"]) or ""
         params["machine"] = self.server.runCommand(["getVariable", "MACHINE"]) or ""
         params["distro"] = self.server.runCommand(["getVariable", "DISTRO"]) or "defaultsetup"
-- 
1.7.4.1





More information about the bitbake-devel mailing list