summaryrefslogtreecommitdiffstats
path: root/bin/emaint
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-31 04:49:16 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-31 04:49:16 +0000
commitba32174f699657690d4a710e4de84fe7ce16c6aa (patch)
treeb59f901e2d2a8ca98713779b42e742a46fec7531 /bin/emaint
parentad5abe215bcf7ee73faa6e27c3f8f99141dc4622 (diff)
downloadportage-ba32174f699657690d4a710e4de84fe7ce16c6aa.tar.gz
portage-ba32174f699657690d4a710e4de84fe7ce16c6aa.tar.bz2
portage-ba32174f699657690d4a710e4de84fe7ce16c6aa.zip
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
Diffstat (limited to 'bin/emaint')
-rwxr-xr-xbin/emaint18
1 files changed, 1 insertions, 17 deletions
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):