elog/mod_save: join /var/log with os.sep too
authorZac Medico <zmedico@gentoo.org>
Sat, 3 Sep 2011 23:17:04 +0000 (16:17 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 3 Sep 2011 23:17:04 +0000 (16:17 -0700)
pym/portage/elog/mod_save.py
pym/portage/elog/mod_save_summary.py

index bfccd77399d6caf296193a281948748752416ca7..c69f4a3cfc0812b56ff426bc1ad1710c848d6b56 100644 (file)
@@ -18,7 +18,8 @@ def process(mysettings, key, logentries, fulltext):
        if mysettings.get("PORT_LOGDIR"):
                logdir = normalize_path(mysettings["PORT_LOGDIR"])
        else:
-               logdir = os.path.join(mysettings["EPREFIX"], "var", "log", "portage")
+               logdir = os.path.join(os.sep, mysettings["EPREFIX"].lstrip(os.sep),
+                       "var", "log", "portage")
 
        if not os.path.isdir(logdir):
                # Only initialize group/mode if the directory doesn't
index 3196d43b314c4b7094dacd567e5c0aff22a9d960..347f66e6ec7299846c5eceded8fee14bcdddcb76 100644 (file)
@@ -18,7 +18,8 @@ def process(mysettings, key, logentries, fulltext):
        if mysettings.get("PORT_LOGDIR"):
                logdir = normalize_path(mysettings["PORT_LOGDIR"])
        else:
-               logdir = os.path.join(mysettings["EPREFIX"], "var", "log", "portage")
+               logdir = os.path.join(os.sep, mysettings["EPREFIX"].lstrip(os.sep),
+                       "var", "log", "portage")
 
        if not os.path.isdir(logdir):
                # Only initialize group/mode if the directory doesn't