Patchwork [bitbake-devel,6/6] Hob: a minor fix on pmake

login
register
mail settings
Submitter Shane Wang
Date April 2, 2012, 8:29 a.m.
Message ID <f4b102cdf2cd021a0b5acacb034dd568a8e73817.1333355236.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/25071/
State New
Headers show

Comments

Shane Wang - April 2, 2012, 8:29 a.m.
params["pmake"] should be in the format "-j int".
When loading/saving "PARALLEL_MAKE" into templates, configuration.pmake will be
converted into "-j int", as "PACKAGE_CLASSES" and "BBLAYERS" do.

For "PACKAGE_CLASSES" and "BBLAYERS", params["pclass"] and params["layer"] are
also strings rather than the types of configuration.curr_package_format and
configuration.layers.

Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builder.py         |    4 ++--
 bitbake/lib/bb/ui/crumbs/hobeventhandler.py |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 7a786a9..6587734 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -48,7 +48,7 @@  class Configuration:
         self.dldir = params["dldir"]
         self.sstatedir = params["sstatedir"]
         self.sstatemirror = params["sstatemirror"]
-        self.pmake = params["pmake"]
+        self.pmake = int(params["pmake"].split()[1])
         self.bbthread = params["bbthread"]
         self.curr_package_format = " ".join(params["pclass"].split("package_")).strip()
         self.image_rootfs_size = params["image_rootfs_size"]
@@ -83,7 +83,7 @@  class Configuration:
         self.dldir = params["dldir"]
         self.sstatedir = params["sstatedir"]
         self.sstatemirror = params["sstatemirror"]
-        self.pmake = params["pmake"]
+        self.pmake = int(params["pmake"].split()[1])
         self.bbthread = params["bbthread"]
         self.curr_package_format = " ".join(params["pclass"].split("package_")).strip()
         self.image_rootfs_size = params["image_rootfs_size"]
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index c1afa0b..61af131 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -429,7 +429,7 @@  class HobHandler(gobject.GObject):
                 pmake = int(pmake.lstrip("-j "))
             except:
                 pmake = num_threads
-        params["pmake"] = pmake
+        params["pmake"] = "-j %s" % pmake
 
         params["image_addr"] = self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) or ""