From: Peter Kjellerstedt Date: Mon, 18 Feb 2019 07:08:08 +0000 (+0100) Subject: libc-package.bbclass: Add a progress meter for the package task X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~15337 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd2f9b2785779ef65c0c3664dae03b01ced59f6d;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git libc-package.bbclass: Add a progress meter for the package task 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 Signed-off-by: Richard Purdie --- diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass index cf0d8901e3c..34c9151ae90 100644 --- a/meta/classes/libc-package.bbclass +++ b/meta/classes/libc-package.bbclass @@ -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")