Codebase list cdebconf / 1445457
Make text interface print < 10% progress so the user knows it is in progress as soon as the beginning. Samuel Thibault 3 years ago
2 changed file(s) with 9 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
0 cdebconf (0.255) UNRELEASED; urgency=medium
1
2 * Make text interface print < 10% progress so the user knows it is in
3 progress as soon as the beginning.
4
5 -- Samuel Thibault <sthibault@debian.org> Fri, 25 Sep 2020 01:47:02 +0200
6
07 cdebconf (0.254) unstable; urgency=medium
18
29 * Team upload
11651165
11661166 static int text_progress_set(struct frontend *obj, int val)
11671167 {
1168 static int last = 0;
1168 static int last = -10;
11691169 int new;
11701170
11711171 obj->progress_cur = val;
11721172 new = ((double)(obj->progress_cur - obj->progress_min) /
11731173 (double)(obj->progress_max - obj->progress_min) * 100.0);
11741174 if (new < last)
1175 last = 0;
1175 last = -10;
11761176 /* Prevent verbose output */
11771177 if (new / 10 == last / 10)
11781178 return DC_OK;