From 273b785644b859b9f54600ec572641a308cf7292 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 19 Mar 2013 13:10:28 -0700 Subject: [PATCH] config: make circular vartree import lazy --- pym/portage/dbapi/vartree.py | 3 +-- pym/portage/package/ebuild/config.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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 -- 2.26.2