commit:     b69a756099973abbf9719717ea3726519b32ce60
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu May  3 23:00:35 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May  3 23:08:47 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b69a7560

LocationsManager: fix SYSROOT normalization to handle empty SYSROOT

This issue was exposed when building portage-2.3.34 with USE="epydoc"
enabled, since epydoc triggers instantiation of portage.settings.
The empty SYSROOT change for bug 654600 (in commit
1b5110557d1dd725f7c12bbed4b7ceaaec29f2a3) triggered incorrect
normalization behavior here.

Fixes: a41dacf7926c ("Export SYSROOT and ESYSROOT in ebuild env in EAPI 7")

 pym/portage/package/ebuild/_config/LocationsManager.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py 
b/pym/portage/package/ebuild/_config/LocationsManager.py
index b57443ba7..f7d7209ff 100644
--- a/pym/portage/package/ebuild/_config/LocationsManager.py
+++ b/pym/portage/package/ebuild/_config/LocationsManager.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2014 Gentoo Foundation
+# Copyright 2010-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import unicode_literals
@@ -69,7 +69,7 @@ class LocationsManager(object):
                if self.sysroot is None:
                        self.sysroot = "/"
                else:
-                       self.sysroot = 
normalize_path(os.path.abspath(self.sysroot)).rstrip(os.sep) + os.sep
+                       self.sysroot = 
normalize_path(os.path.abspath(self.sysroot or os.sep)).rstrip(os.sep) + os.sep
 
                self.esysroot = self.sysroot.rstrip(os.sep) + self.eprefix + 
os.sep
 

Reply via email to