> On Feb 18, 2017, at 12:45, René J.V. Bertin <[email protected]> wrote:
> 
> Hi,
> 
> I've been tinkering a bit with a build progress bar feature that uses the 
> information certain build systems provide.
> CMake for instance generates Makefiles that print regular "[xyz%] " tags in 
> their regular output which can be processed with a simple scan in ui_message 
> (macports.tcl). One should be able to use 
> `macports::ui_options(progress_generic)` from there, but that feature would 
> have to be initialised. I've failed to do that from portbuild.tcl as well as 
> from `command_exec` in portutil.tcl .
> 
> What have I been missing to access that variable from those places?
> 
> 
> On a more general note I was thinking of supporting this kind of progress 
> reporting via a callback hook which can then be set by (say) the CMake 
> portgroup. I'd love to have progress feedback when not doing a verbose build 
> but not enough to try and hack something generic together that works across 
> most build systems even if they don't provide progress (percentage or "X of 
> of Y") info.
> IIRC we discussed a feature like this a while back; has anyone been giving it 
> any thought?
> 
> R.

Thanks for working on this.

The problem is that it only applies to cmake-generated makefiles and certain 
other one-off makefiles. But maybe a progress bar for some builds is better 
than no build progress bar ever.

Providing a way for portfiles and portgroups to indicate what, if any, regexp 
matches progress information in the build output is probably a good way to go. 
There is an additional complication that some types of builds may need special 
handling. For example, a port building with cmake and muniversal will go from 
0% to 100% for the first architecture, then go from 0% to 100% for the second 
architecture; this detail should be hidden from the user behind a single 
combined progress bar.

The ticket for this issue is https://trac.macports.org/ticket/15939 . Clemens 
had some thoughts there for how it might be done for other ports whose build 
systems don't provide this information, but it would involve maintaining an 
online database.


Reply via email to