1 |
Currently Portage reports its progress in checking collisions forward |
2 |
every 1000th file like so: |
3 |
|
4 |
* checking 4149 files for package collisions |
5 |
1000 files checked ... |
6 |
2000 files checked ... |
7 |
3000 files checked ... |
8 |
4000 files checked ... |
9 |
>>> Merging sys-apps/portage-2.3.8 to / |
10 |
|
11 |
Change it to countdown style so it is easier to anticipate what the |
12 |
next action will be: |
13 |
|
14 |
* checking 4149 files for package collisions |
15 |
3149 files remaining ... |
16 |
2149 files remaining ... |
17 |
1149 files remaining ... |
18 |
149 files remaining ... |
19 |
>>> Merging sys-apps/portage-2.3.8 to / |
20 |
--- |
21 |
pym/portage/dbapi/vartree.py | 5 +++-- |
22 |
1 file changed, 3 insertions(+), 2 deletions(-) |
23 |
|
24 |
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py |
25 |
index 7c8f150bb..04a40b732 100644 |
26 |
--- a/pym/portage/dbapi/vartree.py |
27 |
+++ b/pym/portage/dbapi/vartree.py |
28 |
@@ -3420,13 +3420,14 @@ class dblink(object): |
29 |
dirs_ro = set() |
30 |
symlink_collisions = [] |
31 |
destroot = self.settings['ROOT'] |
32 |
+ totfiles = len(file_list) + len(symlink_list) |
33 |
showMessage(_(" %s checking %d files for package collisions\n") % \ |
34 |
- (colorize("GOOD", "*"), len(file_list) + len(symlink_list))) |
35 |
+ (colorize("GOOD", "*"), totfiles)) |
36 |
for i, (f, f_type) in enumerate(chain( |
37 |
((f, "reg") for f in file_list), |
38 |
((f, "sym") for f in symlink_list))): |
39 |
if i % 1000 == 0 and i != 0: |
40 |
- showMessage(_("%d files checked ...\n") % i) |
41 |
+ showMessage(_("%d files remaining ...\n") % (totfiles - i)) |
42 |
|
43 |
dest_path = normalize_path( |
44 |
os.path.join(destroot, f.lstrip(os.path.sep))) |
45 |
-- |
46 |
2.14.1 |