From: Zac Medico Date: Tue, 19 Mar 2013 20:10:28 +0000 (-0700) Subject: config: make circular vartree import lazy X-Git-Tag: v2.2.0_alpha167~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=273b785644b859b9f54600ec572641a308cf7292;p=portage.git config: make circular vartree import lazy --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 77220bb5b..9bc6e89b2 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -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], diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 2ac59f090..5f3e1c6b7 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -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