summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-10-09 17:43:26 +0000
committerMarius Mauch <genone@gentoo.org>2007-10-09 17:43:26 +0000
commita6cd59a90b4cd8c567a6cd6f4c36a7483b392ea4 (patch)
treef9651a92402e0cdc7e82d9abde26c91cdd077ede
parentcd5a8992c7a23b0d5bd92c30c7c9e6111ea170ef (diff)
downloadportage-a6cd59a90b4cd8c567a6cd6f4c36a7483b392ea4.tar.gz
portage-a6cd59a90b4cd8c567a6cd6f4c36a7483b392ea4.tar.bz2
portage-a6cd59a90b4cd8c567a6cd6f4c36a7483b392ea4.zip
Replace hardcoded path with new constant
svn path=/main/trunk/; revision=8016
-rw-r--r--pym/emerge/__init__.py4
-rw-r--r--pym/portage/const.py1
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]))