more prefix confusement
authorFabian Groffen <grobian@gentoo.org>
Wed, 16 Jul 2008 11:52:52 +0000 (11:52 -0000)
committerFabian Groffen <grobian@gentoo.org>
Wed, 16 Jul 2008 11:52:52 +0000 (11:52 -0000)
svn path=/main/branches/prefix/; revision=11079

pym/portage/sets/__init__.py
pym/portage/sets/files.py

index d688164b58246c5ebde28f1000c37a9bfcaacecb..e1ffcaedb23a6285e9d390ea9dfa9a0eba7ff005 100644 (file)
@@ -5,7 +5,7 @@
 import os
 from ConfigParser import SafeConfigParser, NoOptionError
 from portage import load_mod
-from portage.const import USER_CONFIG_PATH, GLOBAL_CONFIG_PATH
+from portage.const import USER_CONFIG_PATH, GLOBAL_CONFIG_PATH, EPREFIX
 
 SETPREFIX = "@"
 
@@ -116,7 +116,7 @@ def load_default_config(settings, trees):
        setconfigpaths.append(os.path.join(settings["PORTDIR"], "sets.conf"))
        setconfigpaths += [os.path.join(x, "sets.conf") for x in settings["PORTDIR_OVERLAY"].split()]
        setconfigpaths.append(os.path.join(settings["PORTAGE_CONFIGROOT"],
-               USER_CONFIG_PATH.lstrip(os.path.sep), "sets.conf"))
+               USER_CONFIG_PATH.lstrip(EPREFIX + os.path.sep), "sets.conf"))
        return SetConfig(setconfigpaths, settings, trees)
 
 # adhoc test code
index e30785621343af96e55ff1f75d76e456df813a76..9507a1bf15abaffc3f86baafa571176c12fd19b5 100644 (file)
@@ -7,7 +7,7 @@ import re
 from itertools import chain
 
 from portage.util import grabfile, write_atomic, ensure_dirs
-from portage.const import PRIVATE_PATH, USER_CONFIG_PATH
+from portage.const import PRIVATE_PATH, USER_CONFIG_PATH, EPREFIX
 from portage.locks import lockfile, unlockfile
 from portage import portage_gid
 from portage.sets.base import PackageSet, EditablePackageSet
@@ -109,7 +109,7 @@ class StaticFileSet(EditablePackageSet):
        
        def multiBuilder(self, options, settings, trees):
                rValue = {}
-               directory = options.get("directory", os.path.join(settings["PORTAGE_CONFIGROOT"], USER_CONFIG_PATH.lstrip(os.sep), "sets"))
+               directory = options.get("directory", os.path.join(settings["PORTAGE_CONFIGROOT"], USER_CONFIG_PATH.lstrip(EPREFIX + os.sep), "sets"))
                name_pattern = options.get("name_pattern", "${name}")
                if not "$name" in name_pattern and not "${name}" in name_pattern:
                        raise SetConfigError("name_pattern doesn't include ${name} placeholder")
@@ -150,7 +150,7 @@ class ConfigFileSet(PackageSet):
        
        def multiBuilder(self, options, settings, trees):
                rValue = {}
-               directory = options.get("directory", os.path.join(settings["PORTAGE_CONFIGROOT"], USER_CONFIG_PATH.lstrip(os.sep)))
+               directory = options.get("directory", os.path.join(settings["PORTAGE_CONFIGROOT"], USER_CONFIG_PATH.lstrip(EPREFIX + os.sep)))
                name_pattern = options.get("name_pattern", "sets/package_$suffix")
                if not "$suffix" in name_pattern and not "${suffix}" in name_pattern:
                        raise SetConfigError("name_pattern doesn't include $suffix placeholder")