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

login
register
mail settings
Submitter Dongxiao Xu
Date March 29, 2012, 12:01 p.m.
Message ID <dd1fb02836ff85baba8a4a5db4c70ba547f7fc16.1333022081.git.dongxiao.xu@intel.com>
Download mbox | patch
Permalink /patch/24825/
State Accepted
Commit b195823d19bcb71bd5eef19acfe22b2dd670d90a
Headers show

Comments

Dongxiao Xu - March 29, 2012, 12:01 p.m.
While adding meta-hob layer, we need to detect whether it already
exists in current layers.

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

Patch

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"