<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>186945</bug_id>
          
          <creation_ts>2007-07-28 23:04 0000</creation_ts>
          <short_desc>app-portage/gentoolkit - progress bar in new revdep-rebuild flickers</short_desc>
          <delta_ts>2007-09-13 15:51:22 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Portage Development</product>
          <component>Tools</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <keywords>InSVN</keywords>
          <priority>P2</priority>
          <bug_severity>trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>170220</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>rmmarm@sdf.lonestar.org</reporter>
          <assigned_to>tools-portage@gentoo.org</assigned_to>
          <cc>dhp_gentoo@doublehp.org</cc>

      

      
          <long_desc isprivate="0">
            <who>rmmarm@sdf.lonestar.org</who>
            <bug_when>2007-07-28 23:04:26 0000</bug_when>
            <thetext>I love the new revdep-rebuild.  It&apos;s awesome.  However, the [X%] progress bar thing flickers horribly.  It&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rmmarm@sdf.lonestar.org</who>
            <bug_when>2007-07-28 23:05:34 0000</bug_when>
            <thetext>Created an attachment (id=126280)
Patch to remove flicker from the progress meter

As promised, here&apos;s a patch to /usr/bin/revdep-rebuild.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dhp_gentoo@doublehp.org</who>
            <bug_when>2007-08-04 10:20:37 0000</bug_when>
            <thetext>I put my complain in here, since it&apos;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 &quot;visible hight of the mail&quot; (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 &quot;bar&quot; =&gt; no spinning cursor).

You will find there the code to implement it ^^</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dhp_gentoo@doublehp.org</who>
            <bug_when>2007-08-04 10:21:44 0000</bug_when>
            <thetext>Robert, maybe it flickers because it is synchronised with your screen refresh ^^ LCD is a solution.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rmmarm@sdf.lonestar.org</who>
            <bug_when>2007-08-04 13:13:31 0000</bug_when>
            <thetext>(In reply to comment #3)
&gt; Robert, maybe it flickers because it is synchronised with your screen refresh
&gt; ^^ LCD is a solution.
&gt; 

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 &quot;-quiet&quot; flag when running from your cron job?  Does that get rid of the extra output in your logs?


</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dhp_gentoo@doublehp.org</who>
            <bug_when>2007-08-04 14:50:52 0000</bug_when>
            <thetext>I tell you next week.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2007-08-07 01:25:57 0000</bug_when>
            <thetext>Use --quiet to prevent the progress bar in scripts and cron jobs.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>michael@smith-li.com</who>
            <bug_when>2007-08-08 13:24:54 0000</bug_when>
            <thetext>Created an attachment (id=127278)
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&apos;s the same idea as Robert&apos;s, just rewritten so it patches cleanly.

Thanks, Robert!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2007-08-08 14:54:19 0000</bug_when>
            <thetext>$ svn commit -m &quot;Fix progress bar to only update when there is a change (Bug #186945)&quot;
Sending        ChangeLog
Sending        src/revdep-rebuild/revdep-rebuild-rewrite
Transmitting file data ..
Committed revision 431.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2007-09-13 15:51:22 0000</bug_when>
            <thetext>Released in gentoolkit-0.2.4_pre7</thetext>
          </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>126280</attachid>
            <date>2007-07-28 23:05 0000</date>
            <desc>Patch to remove flicker from the progress meter</desc>
            <filename>progress.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC91c3IvYmluL3JldmRlcC1yZWJ1aWxkCTIwMDctMDctMjggMTY6NTk6MDYuMDAwMDAwMDAw
IC0wNDAwCisrKyAvdXNyL2Jpbi9yZXZkZXAtcmVidWlsZC5ybW1hcm0JMjAwNy0wNy0yOCAxODo1
Mjo1NC4wMDAwMDAwMDAgLTA0MDAKQEAgLTE2Myw4ICsxNjMsMTAgQEAKIAllbHNlCiAJCXByb2dy
ZXNzKCkgewogCQkJKCggJDEgPT0gJDIgKSkgJiYgbG9jYWwgbGI9JCdcbicKLQkJCWVjaG8gLW5l
ICdcciAgICAgICAgICAgICAgICAgICAgICAgICBccicKLQkJCWVjaG8gLW4gIlsgJCgoICQxICog
MTAwIC8gJDIgKSklIF0gJGxiIgorICAgICAgICAgbmV3PSQoKCAkMSAqIDEwMCAvICQyICkpCisJ
CQkoKCAkbmV3ICE9ICRvbGQgKSkgJiYgZWNobyAtbmUgJ1xyICAgICAgICAgICAgICAgICAgICAg
ICAgIFxyJworICAgICAgICAgKCggJG5ldyAhPSAkb2xkICkpICYmIGVjaG8gLW4gIlsgJG5ldyUg
XSAkbGIiCisgICAgICAgICBvbGQ9JG5ldwogCQl9CiAJCXByb2dyZXNzICRACiAJZmkKQEAgLTMw
NCw2ICszMDYsNyBAQAogXV0KIAogZ2V0X2FyZ3MgIiRAIgorb2xkPTAKICMgVXNlIHRoZSBjb2xv
ciBwcmVmZXJlbmNlIGZyb20gcG9ydGFnZQogZXhwb3J0IE5PQ09MT1I9JChwb3J0YWdlcSBlbnZ2
YXIgTk9DT0xPUikKIFtbICROT0NPTE9SID0geWVzIHx8ICROT0NPTE9SID0gdHJ1ZSBdXSAmJiBl
eHBvcnQgUkNfTk9DT0xPUj15ZXMgIyBIQUNLISAoZ3JyKQo=
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>127278</attachid>
            <date>2007-08-08 13:24 0000</date>
            <desc>revdep-rebuild-rewrite.patch</desc>
            <filename>revdep-rebuild-rewrite.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHJldmRlcC1yZWJ1aWxkLXJld3JpdGUub3JpZwkyMDA3LTA4LTA4IDA4OjMzOjE4LjAwMDAw
MDAwMCAtMDQwMAorKysgcmV2ZGVwLXJlYnVpbGQtcmV3cml0ZQkyMDA3LTA4LTA4IDA4OjQ4OjU4
LjAwMDAwMDAwMCAtMDQwMApAQCAtNzAsNiArNzAsNyBAQAogZGVjbGFyZSBTRUFSQ0hfRElSU19N
QVNLICMgTGlzdCBvZ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