diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2014-02-05 19:12:39 +0100 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2014-02-05 19:12:39 +0100 |
commit | ddea7da749c71a9ee94694a5f742b1ecf82157c3 (patch) | |
tree | e8cfafa9d9b7ebdc55de25e496827f9753e75ba2 /pym | |
parent | Check presence of .portage_not_installed file instead of .git directory (diff) | |
download | portage-ddea7da749c71a9ee94694a5f742b1ecf82157c3.tar.gz portage-ddea7da749c71a9ee94694a5f742b1ecf82157c3.tar.bz2 portage-ddea7da749c71a9ee94694a5f742b1ecf82157c3.zip |
Use local dispatch-conf.conf and make.globals when using Portage from working copy or unpacked tarball.
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/dispatch_conf.py | 7 | ||||
-rw-r--r-- | pym/portage/package/ebuild/config.py | 11 |
2 files changed, 11 insertions, 7 deletions
diff --git a/pym/portage/dispatch_conf.py b/pym/portage/dispatch_conf.py index 0c71e6552..f975ccd59 100644 --- a/pym/portage/dispatch_conf.py +++ b/pym/portage/dispatch_conf.py @@ -1,5 +1,5 @@ # archive_conf.py -- functionality common to archive-conf and dispatch-conf -# Copyright 2003-2013 Gentoo Foundation +# Copyright 2003-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 @@ -52,7 +52,10 @@ def diffstatusoutput(cmd, file1, file2): def read_config(mandatory_opts): eprefix = portage.settings["EPREFIX"] - config_path = os.path.join(eprefix or os.sep, "etc/dispatch-conf.conf") + if portage._not_installed: + config_path = os.path.join(portage.PORTAGE_BASE_PATH, "cnf", "dispatch-conf.conf") + else: + config_path = os.path.join(eprefix or os.sep, "etc/dispatch-conf.conf") loader = KeyValuePairFileLoader(config_path, None) opts, _errors = loader.load() if not opts: diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 9e9b3fcc1..e104501dc 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -28,7 +28,7 @@ from portage import bsd_chflags, \ load_mod, os, selinux, _unicode_decode from portage.const import CACHE_PATH, \ DEPCACHE_PATH, INCREMENTALS, MAKE_CONF_FILE, \ - MODULES_FILE_PATH, \ + MODULES_FILE_PATH, PORTAGE_BASE_PATH, \ PRIVATE_PATH, PROFILE_PATH, USER_CONFIG_PATH, \ USER_VIRTUALS_FILE from portage.dbapi import dbapi @@ -387,10 +387,11 @@ class config(object): # Allow make.globals to set default paths relative to ${EPREFIX}. expand_map["EPREFIX"] = eprefix - make_globals_path = os.path.join( - self.global_config_path, 'make.globals') - old_make_globals = os.path.join(config_root, - 'etc', 'make.globals') + if portage._not_installed: + make_globals_path = os.path.join(PORTAGE_BASE_PATH, "cnf", "make.globals") + else: + make_globals_path = os.path.join(self.global_config_path, "make.globals") + old_make_globals = os.path.join(config_root, "etc", "make.globals") if os.path.isfile(old_make_globals) and \ not os.path.samefile(make_globals_path, old_make_globals): # Don't warn if they refer to the same path, since |