From ba32174f699657690d4a710e4de84fe7ce16c6aa Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 31 May 2007 04:49:16 +0000 Subject: Create one unified dbapi.update_ents() method and use it for both fixpackages and the emaint move{inst,bin} targets. svn path=/main/trunk/; revision=6686 --- bin/emaint | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'bin') diff --git a/bin/emaint b/bin/emaint index 174b4540d..1c179df10 100755 --- a/bin/emaint +++ b/bin/emaint @@ -246,23 +246,7 @@ class MoveHandler(object): # Searching for updates in all the metadata is relatively slow, so this # is where the progress bar comes out of indeterminate mode. - cpv_all = self._tree.dbapi.cpv_all() - cpv_all.sort() - maxval = len(cpv_all) - aux_get = self._tree.dbapi.aux_get - aux_update = self._tree.dbapi.aux_update - update_keys = self._update_keys - from itertools import izip - from portage.update import update_dbentries - if onProgress: - onProgress(maxval, 0) - for i, cpv in enumerate(cpv_all): - metadata = dict(izip(update_keys, aux_get(cpv, update_keys))) - metadata_updates = update_dbentries(updates, metadata) - if metadata_updates: - aux_update(cpv, metadata_updates) - if onProgress: - onProgress(maxval, i+1) + self._tree.dbapi.update_ents(updates, onProgress=onProgress) return errors class MoveInstalled(MoveHandler): -- cgit v1.2.3-1-g7c22