Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186945 - app-portage/gentoolkit - progress bar in new revdep-rebuild flickers
Summary: app-portage/gentoolkit - progress bar in new revdep-rebuild flickers
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 170220
  Show dependency tree
 
Reported: 2007-07-28 23:04 UTC by Robert Marmorstein
Modified: 2007-09-13 15:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to remove flicker from the progress meter (progress.patch,719 bytes, patch)
2007-07-28 23:05 UTC, Robert Marmorstein
Details | Diff
revdep-rebuild-rewrite.patch (revdep-rebuild-rewrite.patch,1.61 KB, patch)
2007-08-08 13:24 UTC, michael@smith-li.com
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Marmorstein 2007-07-28 23:04:26 UTC
I love the new revdep-rebuild.  It's awesome.  However, the [X%] progress bar thing flickers horribly.  It's easy enough to fix -- just add code to only print when something has changed.  I will attach a patch to this bug report.

Reproducible: Always

Steps to Reproduce:
1. Run revdep-rebuild without the -quiet flag.
2. Freeze in horror as the flickering progress bar gives you a headache. 
3. Run screaming from the keyboard.

Actual Results:  
Progress bar flickers.

Expected Results:  
Progress bar updates only when the percentage is different from before.
Comment 1 Robert Marmorstein 2007-07-28 23:05:34 UTC
Created attachment 126280 [details, diff]
Patch to remove flicker from the progress meter

As promised, here's a patch to /usr/bin/revdep-rebuild.
Comment 2 DEMAINE Benoît-Pierre, aka DoubleHP 2007-08-04 10:20:37 UTC
I put my complain in here, since it's similar bug, and to avoid creation of new one: I use revdep in cron. Cron mails me the result. It is usually very long since it mails me the compile log as side effect. But, see what happens:
(this took 3/4 of the "visible hight of the mail" (not weight, but height):

 * Checking dynamic linking consistency

                         
[ 0% ] 
                         
[ 0% ] 
                         
[ 0% ] 
[...]
[ 99% ] 
                         
[ 99% ] 
                         
[ 100% ] 
 *   broken /opt/sun-jdk-1.4.2.15/jre/lib/i386/libnio.so (no version information available)
 * Generated new //.revdep-rebuild.3_rebuild

This has a very simple workaroung: do not use progress bar at all when the output is not a console (I have seen this feature some where, may be emerge: no progress bar or spinning bar when used like
emerge -va foo |grep -v bar
(outputs everything except "bar" => no spinning cursor).

You will find there the code to implement it ^^
Comment 3 DEMAINE Benoît-Pierre, aka DoubleHP 2007-08-04 10:21:44 UTC
Robert, maybe it flickers because it is synchronised with your screen refresh ^^ LCD is a solution.
Comment 4 Robert Marmorstein 2007-08-04 13:13:31 UTC
(In reply to comment #3)
> Robert, maybe it flickers because it is synchronised with your screen refresh
> ^^ LCD is a solution.
> 

Thanks for the suggestion DeMaine, but as it turns out -- I only use LCD.  The problem is simply that the progress bar gets draw multiple times when it does not need to.  The patch I attached ought to solve the problem.  Also, have you tried using the "-quiet" flag when running from your cron job?  Does that get rid of the extra output in your logs?


Comment 5 DEMAINE Benoît-Pierre, aka DoubleHP 2007-08-04 14:50:52 UTC
I tell you next week.
Comment 6 Paul Varner (RETIRED) gentoo-dev 2007-08-07 01:25:57 UTC
Use --quiet to prevent the progress bar in scripts and cron jobs.
Comment 7 michael@smith-li.com 2007-08-08 13:24:54 UTC
Created attachment 127278 [details, diff]
revdep-rebuild-rewrite.patch

Patch against the latest SVN version of *-rewrite. This patch also includes the fix to using ewarn before sourcing /etc/functions.sh.

As for the progress() fix, It's the same idea as Robert's, just rewritten so it patches cleanly.

Thanks, Robert!
Comment 8 Paul Varner (RETIRED) gentoo-dev 2007-08-08 14:54:19 UTC
$ svn commit -m "Fix progress bar to only update when there is a change (Bug #186945)"
Sending        ChangeLog
Sending        src/revdep-rebuild/revdep-rebuild-rewrite
Transmitting file data ..
Committed revision 431.
Comment 9 Paul Varner (RETIRED) gentoo-dev 2007-09-13 15:51:22 UTC
Released in gentoolkit-0.2.4_pre7