commit: aac6f2ab43afb78bd183a6d4a06c131cf70bba51
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 24 13:21:26 2017 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Aug 27 09:33:17 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=aac6f2ab
_collision_protect: report progress in work todo
Currently Portage reports its progress in checking collisions forward
every 1000th file like so:
* checking 4149 files for package collisions
1000 files checked ...
2000 files checked ...
3000 files checked ...
4000 files checked ...
>>> Merging sys-apps/portage-2.3.8 to /
Change it to countdown style so it is easier to anticipate what the
next action will be:
* checking 4149 files for package collisions
3149 files remaining ...
2149 files remaining ...
1149 files remaining ...
149 files remaining ...
>>> Merging sys-apps/portage-2.3.8 to /
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
pym/portage/dbapi/vartree.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 7c8f150bb..04a40b732 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -3420,13 +3420,14 @@ class dblink(object):
dirs_ro = set()
symlink_collisions = []
destroot = self.settings['ROOT']
+ totfiles = len(file_list) + len(symlink_list)
showMessage(_(" %s checking %d files for package
collisions\n") % \
- (colorize("GOOD", "*"), len(file_list) +
len(symlink_list)))
+ (colorize("GOOD", "*"), totfiles))
for i, (f, f_type) in enumerate(chain(
((f, "reg") for f in file_list),
((f, "sym") for f in symlink_list))):
if i % 1000 == 0 and i != 0:
- showMessage(_("%d files checked ...\n")
% i)
+ showMessage(_("%d files remaining
...\n") % (totfiles - i))
dest_path = normalize_path(
os.path.join(destroot,
f.lstrip(os.path.sep)))