Combine two default EAPI settings in portdbapi.aux_get().
authorZac Medico <zmedico@gentoo.org>
Sat, 23 Dec 2006 01:56:34 +0000 (01:56 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 23 Dec 2006 01:56:34 +0000 (01:56 -0000)
svn path=/main/trunk/; revision=5359

pym/portage.py

index 34fb37f63ec2816d6fc2227e98449c28d3860226..35cdbdc6ac5fab858dcb7177fa117c485bbd3f3c 100644 (file)
@@ -5376,6 +5376,9 @@ class portdbapi(dbapi):
 
                        self.auxdb[mylocation][mycpv] = mydata
 
+               if not mydata.setdefault("EAPI", "0"):
+                       mydata["EAPI"] = "0"
+
                #finally, we look at our internal cache entry and return the requested data.
                returnme = []
                for x in mylist:
@@ -5384,15 +5387,8 @@ class portdbapi(dbapi):
                        else:
                                returnme.append(mydata.get(x,""))
 
-               if "EAPI" in mylist:
-                       idx = mylist.index("EAPI")
-                       if not returnme[idx]:
-                               returnme[idx] = "0"
-
                if cache_me:
                        aux_cache = {}
-                       if not mydata.setdefault("EAPI", "0"):
-                               mydata["EAPI"] = "0"
                        for x in self._aux_cache_keys:
                                aux_cache[x] = mydata.get(x, "")
                        self._aux_cache[mycpv] = aux_cache