Add support for /etc/portage/make.profile as an alternative to
authorZac Medico <zmedico@gentoo.org>
Mon, 16 Aug 2010 02:25:32 +0000 (19:25 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 16 Aug 2010 02:25:32 +0000 (19:25 -0700)
/etc/make.profile. If both /etc/make.profile/ and
/etc/portage/make.profile/ exist, then /etc/make.profile/
will be preferred.

man/portage.5
pym/portage/package/ebuild/config.py

index d13eee5245573bd47bad7013ce8b99b27a02f27e..e9da4c33910ab9ceb0a8b6c46d071e19b385e952 100644 (file)
@@ -21,7 +21,7 @@ make.globals
 .BR make.conf (5)
 .fi
 .TP
-.BR /etc/make.profile/
+\fB/etc/make.profile/\fR or \fB/etc/portage/make.profile/\fR
 site\-specific overrides go in \fB/etc/portage/profile/\fR
 .nf
 deprecated
@@ -144,7 +144,7 @@ is described extensivly in \fBmake.conf\fR(5).
 The global custom settings for Portage.  See \fBmake.conf\fR(5).
 .RE
 .TP
-.BR /etc/make.profile/
+\fB/etc/make.profile/\fR or \fB/etc/portage/make.profile/\fR
 This is usually just a symlink to the correct profile in 
 \fB/usr/portage/profiles/\fR.  Since it is part of the portage tree, it 
 may easily be updated/regenerated by running `emerge \-\-sync`.  It defines 
@@ -154,7 +154,9 @@ directory and populate it.  However, if you just wish to override some
 settings, use \fB/etc/portage/profile/\fR (it supports all of the same file
 types that \fB/etc/make.profile/\fR does, except parent). Do NOT edit the
 settings in \fB/etc/make.profile/\fR because they WILL be lost with the next
-`emerge \-\-sync`.
+`emerge \-\-sync`. If both \fB/etc/make.profile/\fR and
+\fB/etc/portage/make.profile/\fR exist, then \fB/etc/make.profile/\fR
+will be preferred.
 
 Any file in this directory, directories of other profiles or top-level
 "profiles" directory that begins with "package." or "use." can be more than
index d01f7aeab98f0fb96aaacab4866ac9d34b2a60cd..27cd854702dfaf083956dba73ec189aad89ccb7d 100644 (file)
@@ -457,7 +457,12 @@ class config(object):
                                if os.path.isdir(config_profile_path):
                                        self.profile_path = config_profile_path
                                else:
-                                       self.profile_path = None
+                                       config_profile_path = \
+                                               os.path.join(abs_user_config, 'make.profile')
+                                       if os.path.isdir(config_profile_path):
+                                               self.profile_path = config_profile_path
+                                       else:
+                                               self.profile_path = None
                        else:
                                self.profile_path = config_profile_path