From patchwork Thu Mar 29 12:01:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel,02/14] Hob: Fix adding duplicated meta-hob layer Date: Thu, 29 Mar 2012 12:01:08 -0000 From: Dongxiao Xu X-Patchwork-Id: 24825 Message-Id: To: bitbake-devel@lists.openembedded.org While adding meta-hob layer, we need to detect whether it already exists in current layers. Signed-off-by: Dongxiao Xu --- 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"