diff options
author | 2008-12-04 23:57:32 +0000 | |
---|---|---|
committer | 2008-12-04 23:57:32 +0000 | |
commit | 8954c37a146e73f96550ca58d2e467b91dec2dd7 (patch) | |
tree | 2d32bfe88da55427eb426e8559c67f39ed3c4124 /pym/portage/dbapi/__init__.py | |
parent | Enable FEATURES=fixpackages by default since the performance is pretty (diff) | |
download | portage-8954c37a146e73f96550ca58d2e467b91dec2dd7.tar.gz portage-8954c37a146e73f96550ca58d2e467b91dec2dd7.tar.bz2 portage-8954c37a146e73f96550ca58d2e467b91dec2dd7.zip |
Make fixpackages less noisy by only generting '*' characters for packages
that are modified by updates. (trunk r12155)
svn path=/main/branches/2.1.6/; revision=12158
Diffstat (limited to 'pym/portage/dbapi/__init__.py')
-rw-r--r-- | pym/portage/dbapi/__init__.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py index 2bdb3e7cd..435ffebbb 100644 --- a/pym/portage/dbapi/__init__.py +++ b/pym/portage/dbapi/__init__.py @@ -200,13 +200,17 @@ class dbapi(object): else: writemsg("!!! Invalid db entry: %s\n" % mypath, noiselevel=-1) - def update_ents(self, updates, onProgress=None): + def update_ents(self, updates, onProgress=None, onUpdate=None): """ Update metadata of all packages for package moves. @param updates: A list of move commands @type updates: List @param onProgress: A progress callback function @type onProgress: a callable that takes 2 integer arguments: maxval and curval + @param onUpdate: A progress callback function called only + for packages that are modified by updates. + @type onUpdate: a callable that takes 2 integer arguments: + maxval and curval """ cpv_all = self.cpv_all() cpv_all.sort() @@ -216,6 +220,8 @@ class dbapi(object): update_keys = ["DEPEND", "RDEPEND", "PDEPEND", "PROVIDE"] from itertools import izip from portage.update import update_dbentries + if onUpdate: + onUpdate(maxval, 0) if onProgress: onProgress(maxval, 0) for i, cpv in enumerate(cpv_all): @@ -223,6 +229,8 @@ class dbapi(object): metadata_updates = update_dbentries(updates, metadata) if metadata_updates: aux_update(cpv, metadata_updates) + if onUpdate: + onUpdate(maxval, i+1) if onProgress: onProgress(maxval, i+1) |