[OE-core] [PATCH 3/3] libc-package.bbclass: Add a progress meter for the package task

Peter Kjellerstedt peter.kjellerstedt at axis.com
Sun Feb 17 14:51:07 UTC 2019


The package task for glibc-locale takes a very long time to execute,
especially if using qemu. In that case, a progress meter helps a lot to
show the progress of the task.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
---
 meta/classes/libc-package.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index ee598905b0..f1c0545c67 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -348,11 +348,16 @@ python package_do_split_gconvs () {
         makefile = oe.path.join(d.getVar("WORKDIR"), "locale-tree", "Makefile")
         m = open(makefile, "w")
         m.write("all: %s\n\n" % " ".join(commands.keys()))
+        i = 1
+        total = len(commands)
         for cmd in commands:
             m.write(cmd + ":\n")
+            m.write("\t at echo 'Progress %d/%d'\n" % (i, total))
             m.write("\t" + commands[cmd] + "\n\n")
+            i = i + 1
         m.close()
         d.setVar("EXTRA_OEMAKE", "-C %s ${PARALLEL_MAKE}" % (os.path.dirname(makefile)))
+        d.setVarFlag("oe_runmake", "progress", "outof:Progress\s(\d+)/(\d+)")
         bb.note("Executing binary locale generation makefile")
         bb.build.exec_func("oe_runmake", d)
         bb.note("collecting binary locales from locale tree")
-- 
2.12.0



More information about the Openembedded-core mailing list