config: make circular vartree import lazy
authorZac Medico <zmedico@gentoo.org>
Tue, 19 Mar 2013 20:10:28 +0000 (13:10 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 19 Mar 2013 20:10:28 +0000 (13:10 -0700)
pym/portage/dbapi/vartree.py
pym/portage/package/ebuild/config.py

index 77220bb5b8a132808200fb0646affca6ce75bbef..9bc6e89b2d1f6a48552b794d1a602141333c205b 100644 (file)
@@ -3597,11 +3597,10 @@ class dblink(object):
                        slot_matches.append(self.mycpv)
 
                others_in_slot = []
-               from portage import config
                for cur_cpv in slot_matches:
                        # Clone the config in case one of these has to be unmerged since
                        # we need it to have private ${T} etc... for things like elog.
-                       settings_clone = config(clone=self.settings)
+                       settings_clone = portage.config(clone=self.settings)
                        settings_clone.pop("PORTAGE_BUILDDIR_LOCKED", None)
                        settings_clone.reset()
                        others_in_slot.append(dblink(self.cat, catsplit(cur_cpv)[1],
index 2ac59f090e9d43a7e72df26e73e79f11be94e37f..5f3e1c6b7861f5db4b57514149ba5bc8e07f5e96 100644 (file)
@@ -21,6 +21,7 @@ from _emerge.Package import Package
 import portage
 portage.proxy.lazyimport.lazyimport(globals(),
        'portage.data:portage_gid',
+       'portage.dbapi.vartree:vartree',
        'portage.package.ebuild.doebuild:_phase_func_map',
 )
 from portage import bsd_chflags, \
@@ -32,7 +33,6 @@ from portage.const import CACHE_PATH, \
        USER_VIRTUALS_FILE
 from portage.dbapi import dbapi
 from portage.dbapi.porttree import portdbapi
-from portage.dbapi.vartree import vartree
 from portage.dep import Atom, isvalidatom, match_from_list, use_reduce, _repo_separator, _slot_separator
 from portage.eapi import eapi_exports_AA, eapi_exports_merge_type, \
        eapi_supports_prefix, eapi_exports_replace_vars, _get_eapi_attrs