summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-02-17 05:41:26 +0000
committerZac Medico <zmedico@gentoo.org>2006-02-17 05:41:26 +0000
commit8737c4c494a6f241b1cdf9a220755c1a04032627 (patch)
tree8b42ffd7ae4a4b971a498880a24e8021d698c2c2
parentf8f67a08bb1043a2cc5e7ee08ee82404dc237b3c (diff)
downloadportage-8737c4c494a6f241b1cdf9a220755c1a04032627.tar.gz
portage-8737c4c494a6f241b1cdf9a220755c1a04032627.tar.bz2
portage-8737c4c494a6f241b1cdf9a220755c1a04032627.zip
optimize fixpackages (update_ents) to feed batched package moves to fixdbentries
svn path=/main/trunk/; revision=2723
-rw-r--r--pym/portage.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 07a36226b..e302879ec 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5359,6 +5359,12 @@ class binarytree(packagetree):
#XXX mytmpdir=settings["PORTAGE_TMPDIR"]+"/tbz2"
if not self.populated:
self.populate()
+ move_dict = {}
+ for mylist in mybiglist:
+ mylist=string.split(mylist)
+ if mylist[0] != "move":
+ continue
+ move_dict[mylist[1]] = mylist[2]
for mycpv in self.dbapi.cp_all():
tbz2path=self.getname(mycpv)
if os.path.exists(tbz2path) and not os.access(tbz2path,os.W_OK):
@@ -5368,11 +5374,7 @@ class binarytree(packagetree):
writemsg("*")
mytbz2=xpak.tbz2(tbz2path)
mytbz2.decompose(mytmpdir,cleanup=1)
- for mylist in mybiglist:
- mylist=string.split(mylist)
- if mylist[0] != "move":
- continue
- fixdbentries({mylist[1]:mylist[2]}, mytmpdir)
+ fixdbentries(move_dict, mytmpdir)
mytbz2.recompose(mytmpdir,cleanup=1)
return 1