config.setcpv(): use dbapi._aux_cache_keys
authorZac Medico <zmedico@gentoo.org>
Thu, 22 Dec 2011 20:06:45 +0000 (12:06 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 22 Dec 2011 20:06:45 +0000 (12:06 -0800)
This helps to avoid triggering the environment.bz2 extraction in
vardbapi.aux_get().

pym/portage/package/ebuild/config.py

index f6166c65b6b9f0bf0452dadbb628d8540992ff6f..366f548f1aaebfb64c67db1625465b02ffa8c7ea 100644 (file)
@@ -1188,8 +1188,11 @@ class config(object):
                                # packages since we want to save it PORTAGE_BUILT_USE for
                                # evaluating conditional USE deps in atoms passed via IPC to
                                # helpers like has_version and best_version.
+                               aux_keys = set(aux_keys)
+                               if hasattr(mydb, '_aux_cache_keys'):
+                                       aux_keys = aux_keys.intersection(mydb._aux_cache_keys)
+                               aux_keys.add('USE')
                                aux_keys = list(aux_keys)
-                               aux_keys.append('USE')
                                for k, v in zip(aux_keys, mydb.aux_get(self.mycpv, aux_keys)):
                                        pkg_configdict[k] = v
                                built_use = frozenset(pkg_configdict.pop('USE').split())