aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2017-08-24 15:21:26 +0200
committerFabian Groffen <grobian@gentoo.org>2017-08-27 11:33:17 +0200
commitaac6f2ab43afb78bd183a6d4a06c131cf70bba51 (patch)
treef4a862ccbc14d70485ff82b7b0524c4eab6054cf /pym/portage/dbapi/vartree.py
parentUpdate caches after reporting missing cache updates (diff)
downloadportage-aac6f2ab43afb78bd183a6d4a06c131cf70bba51.tar.gz
portage-aac6f2ab43afb78bd183a6d4a06c131cf70bba51.tar.bz2
portage-aac6f2ab43afb78bd183a6d4a06c131cf70bba51.zip
_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@gentoo.org>
Diffstat (limited to 'pym/portage/dbapi/vartree.py')
-rw-r--r--pym/portage/dbapi/vartree.py5
1 files 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)))