Gentoo Archives: gentoo-commits

From: Arfrever Frehtes Taifersar Arahesis <arfrever@××××××.org>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, pym/portage/
Date: Wed, 05 Feb 2014 18:14:02
Message-Id: 1391623959.ddea7da749c71a9ee94694a5f742b1ecf82157c3.arfrever@gentoo
1 commit: ddea7da749c71a9ee94694a5f742b1ecf82157c3
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Wed Feb 5 18:12:39 2014 +0000
4 Commit: Arfrever Frehtes Taifersar Arahesis <arfrever <AT> apache <DOT> org>
5 CommitDate: Wed Feb 5 18:12:39 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ddea7da7
7
8 Use local dispatch-conf.conf and make.globals when using Portage from working copy or unpacked tarball.
9
10 ---
11 pym/portage/dispatch_conf.py | 7 +++++--
12 pym/portage/package/ebuild/config.py | 11 ++++++-----
13 2 files changed, 11 insertions(+), 7 deletions(-)
14
15 diff --git a/pym/portage/dispatch_conf.py b/pym/portage/dispatch_conf.py
16 index 0c71e65..f975ccd 100644
17 --- a/pym/portage/dispatch_conf.py
18 +++ b/pym/portage/dispatch_conf.py
19 @@ -1,5 +1,5 @@
20 # archive_conf.py -- functionality common to archive-conf and dispatch-conf
21 -# Copyright 2003-2013 Gentoo Foundation
22 +# Copyright 2003-2014 Gentoo Foundation
23 # Distributed under the terms of the GNU General Public License v2
24
25
26 @@ -52,7 +52,10 @@ def diffstatusoutput(cmd, file1, file2):
27
28 def read_config(mandatory_opts):
29 eprefix = portage.settings["EPREFIX"]
30 - config_path = os.path.join(eprefix or os.sep, "etc/dispatch-conf.conf")
31 + if portage._not_installed:
32 + config_path = os.path.join(portage.PORTAGE_BASE_PATH, "cnf", "dispatch-conf.conf")
33 + else:
34 + config_path = os.path.join(eprefix or os.sep, "etc/dispatch-conf.conf")
35 loader = KeyValuePairFileLoader(config_path, None)
36 opts, _errors = loader.load()
37 if not opts:
38
39 diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
40 index 9e9b3fc..e104501 100644
41 --- a/pym/portage/package/ebuild/config.py
42 +++ b/pym/portage/package/ebuild/config.py
43 @@ -28,7 +28,7 @@ from portage import bsd_chflags, \
44 load_mod, os, selinux, _unicode_decode
45 from portage.const import CACHE_PATH, \
46 DEPCACHE_PATH, INCREMENTALS, MAKE_CONF_FILE, \
47 - MODULES_FILE_PATH, \
48 + MODULES_FILE_PATH, PORTAGE_BASE_PATH, \
49 PRIVATE_PATH, PROFILE_PATH, USER_CONFIG_PATH, \
50 USER_VIRTUALS_FILE
51 from portage.dbapi import dbapi
52 @@ -387,10 +387,11 @@ class config(object):
53 # Allow make.globals to set default paths relative to ${EPREFIX}.
54 expand_map["EPREFIX"] = eprefix
55
56 - make_globals_path = os.path.join(
57 - self.global_config_path, 'make.globals')
58 - old_make_globals = os.path.join(config_root,
59 - 'etc', 'make.globals')
60 + if portage._not_installed:
61 + make_globals_path = os.path.join(PORTAGE_BASE_PATH, "cnf", "make.globals")
62 + else:
63 + make_globals_path = os.path.join(self.global_config_path, "make.globals")
64 + old_make_globals = os.path.join(config_root, "etc", "make.globals")
65 if os.path.isfile(old_make_globals) and \
66 not os.path.samefile(make_globals_path, old_make_globals):
67 # Don't warn if they refer to the same path, since