On Wed, 2020-11-11 at 22:24 +0100, Mark Wielaard wrote: > On Wed, 2020-11-11 at 15:57 -0500, Frank Ch. Eigler wrote: > > On Wed, Nov 11, 2020 at 09:31:38PM +0100, Mark Wielaard wrote: > > > debuginfod-find -v enables a progressfn that prints the Progress > > > every > > > time the callback is called. [...] > > > [...] > > > - fprintf (stderr, "Progress %ld / %ld\n", a, b); > > > [...] > > > > Another option is to use something close what the builtin env > > DEBUGINFOD_PROGRESS=1 code does: print self-overwriting messages with > > \r rather than \n. That way many messages can come, but they don't > > overpower the screen. Really, the main reason I put in this > > progressfn into debuginfod-find was to help test that API within the > > testsuite. Maybe now, we don't need that option to do anything but > > set the env var, therby using the common code. > > It was indeed the specific testcase that made me keep the messages as > is. And it seems a good idea to have a code path that explicitly uses > the api calls instead of relying on the environment variable. Also I > found it a bit more difficult to combine the self-overwriting messages > with other verbose output. See my followup patch for producing verbose > output. I think the "per line" verbose/progress for debuginfod-find -v > works out well.
Assuming I totally convinced you with the above speech I pushed this patch. On irc you said you also like the followup debuginfod_set_verbose_fd/DEBUGINFOD_VERBOSE patch, but I am waiting a bit longer with that one to see if there is any other feedback (also because that one exports a new interface). Cheers, Mark