From 96b053ac52fa37fdd61cbb76cb44dfb90fb49f86 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 12 Sep 2012 00:28:51 -0700 Subject: Prefer /etc/portage/make.profile. This is the default location used by current versions of eselect profile, and will soon be the default location in stages. Since eselect profile generates a warning if both /etc/make.profile and /etc/portage/make.profile exist, the new default should be fairly safe (although eselect profile currently prefers /etc/make.profile when both exist). --- pym/_emerge/Scheduler.py | 5 +++-- pym/portage/const.py | 2 +- pym/portage/package/ebuild/_config/LocationsManager.py | 2 +- pym/portage/package/ebuild/config.py | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'pym') diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 9f1c86e3a..795f50329 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -653,10 +653,11 @@ class Scheduler(PollScheduler): if value and value.strip(): continue msg = _("%(var)s is not set... " - "Are you missing the '%(configroot)setc/make.profile' symlink? " + "Are you missing the '%(configroot)s%(profile_path)s' symlink? " "Is the symlink correct? " "Is your portage tree complete?") % \ - {"var": var, "configroot": settings["PORTAGE_CONFIGROOT"]} + {"var": var, "configroot": settings["PORTAGE_CONFIGROOT"], + "profile_path": portage.const.PROFILE_PATH} out = portage.output.EOutput() for line in textwrap.wrap(msg, 70): diff --git a/pym/portage/const.py b/pym/portage/const.py index 3b8e350a2..1ebfdc8ef 100644 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@ -36,7 +36,7 @@ EBUILD_SH_ENV_FILE = USER_CONFIG_PATH + "/bashrc" EBUILD_SH_ENV_DIR = USER_CONFIG_PATH + "/env" CUSTOM_MIRRORS_FILE = USER_CONFIG_PATH + "/mirrors" COLOR_MAP_FILE = USER_CONFIG_PATH + "/color.map" -PROFILE_PATH = "etc/make.profile" +PROFILE_PATH = USER_CONFIG_PATH + "/make.profile" MAKE_DEFAULTS_FILE = PROFILE_PATH + "/make.defaults" # FIXME: not used DEPRECATED_PROFILE_FILE = PROFILE_PATH + "/deprecated" diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py index f7a1177e7..365d507f7 100644 --- a/pym/portage/package/ebuild/_config/LocationsManager.py +++ b/pym/portage/package/ebuild/_config/LocationsManager.py @@ -78,7 +78,7 @@ class LocationsManager(object): self.profile_path = self.config_profile_path else: self.config_profile_path = \ - os.path.join(self.abs_user_config, 'make.profile') + os.path.join(self.config_root, 'etc', 'make.profile') if os.path.isdir(self.config_profile_path): self.profile_path = self.config_profile_path else: diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 8f3b59bc9..ffebd22d1 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -958,7 +958,7 @@ class config(object): if profile_broken: abs_profile_path = None - for x in (PROFILE_PATH, 'etc/portage/make.profile'): + for x in (PROFILE_PATH, 'etc/make.profile'): x = os.path.join(self["PORTAGE_CONFIGROOT"], x) try: os.lstat(x) -- cgit v1.2.3-1-g7c22