<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Great, I'll give it a go then :)</div>
<div>&nbsp;</div>
<div>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 '#&quot;). Just like BitBake's own output. </div>
<div>&nbsp;</div>
<div>Moreover I want to generalize it to support multiple weighted stages, e.g.:</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New">STAGE 1: message</font></div>
<div><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [######################]</font></div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New">STAGE 2: message</font><font face="Courier New"> 2</font></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font face="Courier New">[############&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]</font></div>
<div>&nbsp;</div>
<div>To the progress handler, a stage generally looks like:</div>
<div>&nbsp;</div>
<div><font face="Courier New">[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]</font></div>
<div><font face="Courier New">[#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]</font></div>
<div><font face="Courier New">[##&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]</font></div>
<div><font face="Courier New">[###&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]</font></div>
<div>… etc.</div>
<div>&nbsp;</div>
<div>Will also try to handle the case of an embedded spinner, e.g.: | / - \ -</div>
<div>&nbsp;</div>
<div>Thanks again for the encouragement <font face="Segoe UI Emoji">:)</font></div>
<div>Chris</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>-----Original Message-----<br>

From: Otavio Salvador [<a href="mailto:otavio.salvador@ossystems.com.br">mailto:otavio.salvador@ossystems.com.br</a>]
<br>

Sent: Saturday, April 14, 2018 5:05 PM<br>

To: LAPLANTE,CHRIS (A-Little Falls,ex1) &lt;chris.laplante@agilent.com&gt;<br>

Cc: Patches and discussions about the oe-core layer &lt;openembedded-core@lists.openembedded.org&gt;<br>

Subject: Re: [OE-core] Custom progress handlers</div>
<div>&nbsp;</div>
<div>On Sat, Apr 14, 2018 at 11:56 AM, Chris Laplante via Openembedded-core &lt;<a href="mailto:openembedded-core@lists.openembedded.org">openembedded-core@lists.openembedded.org</a>&gt; wrote:</div>
<div>&gt; I have implemented a simple custom progress handler in </div>
<div>&gt; bitbake/lib/bb/progress.py. It’s designed to handle bar-style </div>
<div>&gt; progress. To use it for my shell tasks, I have modified </div>
<div>&gt; “exec_func_shell” in bitbake/lib/bb/build.py. It’s implemented as a new value for the “progress”</div>
<div>&gt; varflag.</div>
<div>&gt;</div>
<div>&gt; Is there a better, more extensible way to add a custom progress </div>
<div>&gt; handler that doesn’t require modifying progress.py and build.py? It </div>
<div>&gt; would be nice to be able to specify the name of the progress handler </div>
<div>&gt; class to use (e.g. via a [progress-class] varflag) and then have build.py dynamically instantiate it.</div>
<div>&gt; Is that possible? If so, would OE be interested in a patch to implement it?</div>
<div>&nbsp;</div>
<div>I see no problem in adding it; I am curious about your custom handler as well :-)</div>
<div>&nbsp;</div>
<div>-- </div>
<div>Otavio Salvador&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; O.S. Systems</div>
<div><a href="http://www.ossystems.com.br">http://www.ossystems.com.br</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://code.ossystems.com.br">http://code.ossystems.com.br</a></div>
<div>Mobile: &#43;55 (53) 9981-7854&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mobile: &#43;1 (347) 903-9750</div>
<div>&nbsp;</div>
</span></font>
</body>
</html>