Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250157 - portage 2.1.4.5 little funny problem
Summary: portage 2.1.4.5 little funny problem
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-07 11:40 UTC by Vytautas
Modified: 2009-04-11 19:14 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vytautas 2008-12-07 11:40:33 UTC
>>> Updating portage cache: 1324546570%

Reproducible: Always

Steps to Reproduce:
1.Press space one or few times while "Updating portage cache"

Actual Results:  
Ultra update > 100%

Expected Results:  
<100% update
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2008-12-07 22:43:02 UTC
It's not actually counting wrong. You're just screwing up the output by injecting arbitrary characters into it. It's assumed that you're not going to do something like that, or that if you do, you wouldn't file a bug on it...
Comment 2 Zac Medico gentoo-dev 2008-12-08 01:05:37 UTC
The current code uses \b and makes assumptions about you not pressing any keys. This can solved by using \r and redrawing the whole line. 
Comment 3 Zac Medico gentoo-dev 2009-04-11 19:14:01 UTC
(In reply to comment #2)
> The current code uses \b and makes assumptions about you not pressing any keys.
> This can solved by using \r and redrawing the whole line. 

Note that this approach is vunerable to presses of the "Enter" key though, since that will bump it to a new line. To handle cases like that, I guess we'd have use ncurses.