[OE-core] Custom progress handlers

chris.laplante at agilent.com chris.laplante at agilent.com
Sun Apr 15 00:52:25 UTC 2018


Great, I'll give it a go then :)

The type of progress output I'm handling is that of a fixed-width bar that fills up with a certain character (e.g. '*' or '#"). Just like BitBake's own output.

Moreover I want to generalize it to support multiple weighted stages, e.g.:

        STAGE 1: message
        [######################]

        STAGE 2: message 2
        [############          ]

To the progress handler, a stage generally looks like:

[                      ]
[#                     ]
[##                    ]
[###                   ]
… etc.

Will also try to handle the case of an embedded spinner, e.g.: | / - \ -

Thanks again for the encouragement :)
Chris


-----Original Message-----
From: Otavio Salvador [mailto:otavio.salvador at ossystems.com.br]
Sent: Saturday, April 14, 2018 5:05 PM
To: LAPLANTE,CHRIS (A-Little Falls,ex1) <chris.laplante at agilent.com>
Cc: Patches and discussions about the oe-core layer <openembedded-core at lists.openembedded.org>
Subject: Re: [OE-core] Custom progress handlers

On Sat, Apr 14, 2018 at 11:56 AM, Chris Laplante via Openembedded-core <openembedded-core at lists.openembedded.org<mailto:openembedded-core at lists.openembedded.org>> wrote:
> I have implemented a simple custom progress handler in
> bitbake/lib/bb/progress.py. It’s designed to handle bar-style
> progress. To use it for my shell tasks, I have modified
> “exec_func_shell” in bitbake/lib/bb/build.py. It’s implemented as a new value for the “progress”
> varflag.
>
> Is there a better, more extensible way to add a custom progress
> handler that doesn’t require modifying progress.py and build.py? It
> would be nice to be able to specify the name of the progress handler
> class to use (e.g. via a [progress-class] varflag) and then have build.py dynamically instantiate it.
> Is that possible? If so, would OE be interested in a patch to implement it?

I see no problem in adding it; I am curious about your custom handler as well :-)

--
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180415/9354bfe5/attachment-0002.html>


More information about the Openembedded-core mailing list