From: Zac Medico Date: Fri, 21 Jun 2013 22:23:32 +0000 (-0700) Subject: Normalize EPREFIX more. X-Git-Tag: v2.2.0_alpha184~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=df28e9e85a16b0a00f511a42038aa5d2eed615bd;p=portage.git Normalize EPREFIX more. --- diff --git a/pym/portage/const.py b/pym/portage/const.py index 5e960d968..087c0e78f 100644 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@ -164,6 +164,8 @@ if "PORTAGE_OVERRIDE_EPREFIX" in os.environ: EPREFIX = os.environ["PORTAGE_OVERRIDE_EPREFIX"] if EPREFIX: EPREFIX = os.path.normpath(EPREFIX) + if EPREFIX == os.sep: + EPREFIX = "" VCS_DIRS = ("CVS", "RCS", "SCCS", ".bzr", ".git", ".hg", ".svn") diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py index e328441a7..80b6a70c6 100644 --- a/pym/portage/package/ebuild/_config/LocationsManager.py +++ b/pym/portage/package/ebuild/_config/LocationsManager.py @@ -1,6 +1,8 @@ # Copyright 2010-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +from __future__ import unicode_literals + __all__ = ( 'LocationsManager', ) @@ -47,6 +49,10 @@ class LocationsManager(object): if self.eprefix is None: self.eprefix = portage.const.EPREFIX + elif self.eprefix: + self.eprefix = normalize_path(self.eprefix) + if self.eprefix == os.sep: + self.eprefix = "" if self.config_root is None: self.config_root = portage.const.EPREFIX + os.sep