Replace hardcoded path with new constant
authorMarius Mauch <genone@gentoo.org>
Tue, 9 Oct 2007 17:43:26 +0000 (17:43 -0000)
committerMarius Mauch <genone@gentoo.org>
Tue, 9 Oct 2007 17:43:26 +0000 (17:43 -0000)
svn path=/main/trunk/; revision=8016

pym/emerge/__init__.py
pym/portage/const.py

index ef3e4db6269a8ecba921519054b16e1c24656e11..d92ec440cc379fe6106665196b6f0cd2675b5631 100644 (file)
@@ -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"))
index 90447540b2d16cd9f174d545348f122622ce38bb..5e3f8f4071da50614817647822c5d32e7ebf6ec0 100644 (file)
@@ -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]))