From a6cd59a90b4cd8c567a6cd6f4c36a7483b392ea4 Mon Sep 17 00:00:00 2001 From: Marius Mauch Date: Tue, 9 Oct 2007 17:43:26 +0000 Subject: [PATCH] Replace hardcoded path with new constant svn path=/main/trunk/; revision=8016 --- pym/emerge/__init__.py | 4 ++-- pym/portage/const.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index ef3e4db62..d92ec440c 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -31,7 +31,7 @@ except ImportError: import portage del os.environ["PORTAGE_LEGACY_GLOBALS"] from portage import digraph, portdbapi -from portage.const import NEWS_LIB_PATH, CACHE_PATH, PRIVATE_PATH, USER_CONFIG_PATH +from portage.const import NEWS_LIB_PATH, CACHE_PATH, PRIVATE_PATH, USER_CONFIG_PATH, GLOBAL_CONFIG_PATH import emerge.help import portage.xpak, commands, errno, re, socket, time, types @@ -6639,7 +6639,7 @@ def emerge_main(): print colorize("BAD", "\n*** emerging by path is broken and may not always work!!!\n") break - setconfigpaths = ["/usr/share/portage/config/sets.conf"] + setconfigpaths = [os.path.join(GLOBAL_CONFIG_PATH, "sets.conf")] setconfigpaths.append(os.path.join(settings["PORTDIR"], "sets.conf")) setconfigpaths += [os.path.join(x, "sets.conf") for x in settings["PORDIR_OVERLAY"].split()] setconfigpaths.append(os.path.join(os.sep, settings["PORTAGE_CONFIGROOT"], USER_CONFIG_PATH, "sets.conf")) diff --git a/pym/portage/const.py b/pym/portage/const.py index 90447540b..5e3f8f407 100644 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@ -18,6 +18,7 @@ DEPCACHE_PATH = CACHE_PATH+"/dep" USER_CONFIG_PATH = "/etc/portage" MODULES_FILE_PATH = USER_CONFIG_PATH+"/modules" CUSTOM_PROFILE_PATH = USER_CONFIG_PATH+"/profile" +GLOBAL_CONFIG_PATH = "/usr/share/portage/config" #PORTAGE_BASE_PATH = "/usr/lib/portage" PORTAGE_BASE_PATH = os.path.join(os.sep, os.sep.join(__file__.split(os.sep)[:-3])) -- 2.26.2