summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-01-06 23:11:28 -0800
committerZac Medico <zmedico@gentoo.org>2013-01-07 00:40:43 -0800
commit48479b4a3dd62085d1c746b7a807a39b1c6538f3 (patch)
tree69bcc584af5565798bc3ee0dad0828a7f45f2862
parent085444eb5ad618a35107a1276da70f3ed7ca848c (diff)
downloadportage-48479b4a3dd62085d1c746b7a807a39b1c6538f3.tar.gz
portage-48479b4a3dd62085d1c746b7a807a39b1c6538f3.tar.bz2
portage-48479b4a3dd62085d1c746b7a807a39b1c6538f3.zip
If 2 make.conf files found, then warn.
This may give a clue to those who unintentionally end up with 2 make.conf files somehow.
-rw-r--r--pym/portage/package/ebuild/config.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 3875b576e..7bb85b36c 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2012 Gentoo Foundation
+# Copyright 2010-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
__all__ = [
@@ -330,11 +330,20 @@ class config(object):
except OSError:
pass
+ make_conf_count = 0
make_conf = {}
for x in make_conf_paths:
- make_conf.update(getconfig(x,
+ mygcfg = getconfig(x,
tolerant=tolerant, allow_sourcing=True,
- expand=make_conf) or {})
+ expand=make_conf)
+ if mygcfg is not None:
+ make_conf.update(mygcfg)
+ make_conf_count += 1
+
+ if make_conf_count == 2:
+ writemsg("!!! %s\n" %
+ _("Found 2 make.conf files, using both '%s' and '%s'") %
+ tuple(make_conf_paths), noiselevel=-1)
# Allow ROOT setting to come from make.conf if it's not overridden
# by the constructor argument (from the calling environment).