>>> 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
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...
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.
(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.