Strip the leading path separator from USER_CONFIG_PATH
authorZac Medico <zmedico@gentoo.org>
Thu, 11 Oct 2007 16:29:55 +0000 (16:29 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 11 Oct 2007 16:29:55 +0000 (16:29 -0000)
so that os.path.join works correctly.

svn path=/main/trunk/; revision=8051

pym/emerge/__init__.py

index 596320a92aca467203c51bd5f90f03e74decf929..645f2834fca006306db6546ae5b89ba80f8a2449 100644 (file)
@@ -6592,7 +6592,8 @@ def emerge_main():
        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"))
+       setconfigpaths.append(os.path.join(settings["PORTAGE_CONFIGROOT"],
+               USER_CONFIG_PATH.lstrip(os.path.sep), "sets.conf"))
        #setconfig = SetConfig(setconfigpaths, settings, trees[settings["ROOT"]])
        setconfig = make_default_config(settings, trees[settings["ROOT"]])
        del setconfigpaths