env_update: lstrip os.sep in join with eprefix
authorZac Medico <zmedico@gentoo.org>
Sun, 30 Oct 2011 00:25:42 +0000 (17:25 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 30 Oct 2011 00:25:42 +0000 (17:25 -0700)
pym/portage/util/env_update.py

index 14359326486b4a495cbd53622e680e630d72e55e..7879ed9aa0190dab3ffadc30e5c601a8af867a2c 100644 (file)
@@ -51,7 +51,8 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None,
                                target_eroot = portage.settings['EROOT']
                        else:
                                eprefix = os.environ.get("__PORTAGE_TEST_EPREFIX", "")
-                               target_eroot = os.path.join(target_root, eprefix)
+                               target_eroot = os.path.join(target_root,
+                                       eprefix.lstrip(os.sep))
                                target_eroot = target_eroot.rstrip(os.sep) + os.sep
                        if hasattr(portage, "db") and target_eroot in portage.db:
                                vardbapi = portage.db[target_eroot]["vartree"].dbapi