summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-12 19:22:24 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-12 19:22:24 +0000
commit6e28eedeb65ea166e8dcca3f0570817703fc53ed (patch)
treee86821d03cabc2f607fee84f134c4fa35fa5ea1f
parent5eeeb9606416243788f11836acf19e981853cd43 (diff)
downloadportage-6e28eedeb65ea166e8dcca3f0570817703fc53ed.tar.gz
portage-6e28eedeb65ea166e8dcca3f0570817703fc53ed.tar.bz2
portage-6e28eedeb65ea166e8dcca3f0570817703fc53ed.zip
Sort the return value from cpv_all() inside vardbapi._counter_hash() instead
of sorting them in side cpv_all(). Thanks to Brian Harring for the suggestion. svn path=/main/trunk/; revision=11865
-rw-r--r--pym/portage/dbapi/vartree.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index c3628491d..d8e676e8c 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -780,7 +780,9 @@ class vardbapi(dbapi):
from md5 import new as new_hash
h = new_hash()
aux_keys = ["COUNTER"]
- for cpv in self.cpv_all():
+ cpv_list = self.cpv_all()
+ cpv_list.sort()
+ for cpv in cpv_list:
try:
counter, = self.aux_get(cpv, aux_keys)
except KeyError:
@@ -931,7 +933,7 @@ class vardbapi(dbapi):
self.invalidentry(self.getpath(subpath))
continue
returnme.append(subpath)
- returnme.sort()
+
return returnme
def cp_all(self, use_cache=1):