From 370f08d434480c1790950e40db8f7687da78cb14 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 24 Jun 2016 00:06:59 +1200 Subject: classes/image: implement progress support for do_rootfs Use the new task progress functionality to report progress during do_rootfs. This is a little coarse and ideally we would have some progress within the installation section, but it's better than nothing. Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- meta/classes/image.bbclass | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'meta/classes') diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 61295f4bd7..30dfd64828 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -198,6 +198,17 @@ fakeroot python do_rootfs () { from oe.rootfs import create_rootfs from oe.manifest import create_manifest + # NOTE: if you add, remove or significantly refactor the stages of this + # process then you should recalculate the weightings here. This is quite + # easy to do - just change the MultiStageProgressReporter line temporarily + # to pass debug=True as the last parameter and you'll get a printout of + # the weightings as well as a map to the lines where next_stage() was + # called. Of course this isn't critical, but it helps to keep the progress + # reporting accurate. + stage_weights = [1, 203, 354, 186, 65, 4228, 1, 353, 49, 330, 382, 23, 1] + progress_reporter = bb.progress.MultiStageProgressReporter(d, stage_weights) + progress_reporter.next_stage() + # Handle package exclusions excl_pkgs = d.getVar("PACKAGE_EXCLUDE", True).split() inst_pkgs = d.getVar("PACKAGE_INSTALL", True).split() @@ -230,8 +241,12 @@ fakeroot python do_rootfs () { # Generate the initial manifest create_manifest(d) - # Generate rootfs - create_rootfs(d) + progress_reporter.next_stage() + + # generate rootfs + create_rootfs(d, progress_reporter=progress_reporter) + + progress_reporter.finish() } do_rootfs[dirs] = "${TOPDIR}" do_rootfs[cleandirs] += "${S}" -- cgit 1.2.3-korg