]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
libc-package.bbclass: Add a progress meter for the package task
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Mon, 18 Feb 2019 07:08:08 +0000 (08:08 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 19 Feb 2019 15:59:09 +0000 (15:59 +0000)
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@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/libc-package.bbclass

index cf0d8901e3c94d4c42b733685bddf4afbbc6b8c7..34c9151ae90fb97b47cd9e9b009c6d25ae19e4dc 100644 (file)
@@ -348,11 +348,14 @@ 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()))
-        for cmd in commands:
+        total = len(commands)
+        for i, cmd in enumerate(commands):
             m.write(cmd + ":\n")
+            m.write("\t@echo 'Progress %d/%d'\n" % (i, total))
             m.write("\t" + commands[cmd] + "\n\n")
         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")