From c3a4dd7d026bd00eb80bd50178288083175a0d9e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 11 May 2012 15:53:50 -0700 Subject: [PATCH] config: load repositories before profile This is useful for bug #414961, since we want to have access to the repositories when we're loading the profile. --- pym/portage/package/ebuild/config.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 8941de006..45b048cca 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -404,11 +404,28 @@ class config(object): self.make_defaults_use = [] + #Loading Repositories + self["PORTAGE_CONFIGROOT"] = config_root + self["ROOT"] = target_root + self["EPREFIX"] = eprefix + self["EROOT"] = eroot known_repos = [] + portdir = "" + portdir_overlay = "" for confs in [make_globals, make_conf, self.configdict["env"]]: - known_repos.extend(shlex_split(confs.get("PORTDIR", ''))) - known_repos.extend(shlex_split(confs.get("PORTDIR_OVERLAY", ''))) + v = confs.get("PORTDIR") + if v: + portdir = v + known_repos.append(v) + v = confs.get("PORTDIR_OVERLAY") + if v: + portdir_overlay = v + known_repos.extend(shlex_split(v)) known_repos = frozenset(known_repos) + self["PORTDIR"] = portdir + self["PORTDIR_OVERLAY"] = portdir_overlay + self.lookuplist = [self.configdict["env"]] + self.repositories = load_repository_config(self) locations_manager.load_profiles(known_repos) @@ -517,9 +534,6 @@ class config(object): self._ppropertiesdict = portage.dep.ExtendedAtomDict(dict) self._penvdict = portage.dep.ExtendedAtomDict(dict) - #Loading Repositories - self.repositories = load_repository_config(self) - #filling PORTDIR and PORTDIR_OVERLAY variable for compatibility main_repo = self.repositories.mainRepo() if main_repo is not None: -- 2.26.2