1 |
commit: b69a756099973abbf9719717ea3726519b32ce60 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 3 23:00:35 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 3 23:08:47 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b69a7560 |
7 |
|
8 |
LocationsManager: fix SYSROOT normalization to handle empty SYSROOT |
9 |
|
10 |
This issue was exposed when building portage-2.3.34 with USE="epydoc" |
11 |
enabled, since epydoc triggers instantiation of portage.settings. |
12 |
The empty SYSROOT change for bug 654600 (in commit |
13 |
1b5110557d1dd725f7c12bbed4b7ceaaec29f2a3) triggered incorrect |
14 |
normalization behavior here. |
15 |
|
16 |
Fixes: a41dacf7926c ("Export SYSROOT and ESYSROOT in ebuild env in EAPI 7") |
17 |
|
18 |
pym/portage/package/ebuild/_config/LocationsManager.py | 4 ++-- |
19 |
1 file changed, 2 insertions(+), 2 deletions(-) |
20 |
|
21 |
diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py |
22 |
index b57443ba7..f7d7209ff 100644 |
23 |
--- a/pym/portage/package/ebuild/_config/LocationsManager.py |
24 |
+++ b/pym/portage/package/ebuild/_config/LocationsManager.py |
25 |
@@ -1,4 +1,4 @@ |
26 |
-# Copyright 2010-2014 Gentoo Foundation |
27 |
+# Copyright 2010-2018 Gentoo Foundation |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
|
30 |
from __future__ import unicode_literals |
31 |
@@ -69,7 +69,7 @@ class LocationsManager(object): |
32 |
if self.sysroot is None: |
33 |
self.sysroot = "/" |
34 |
else: |
35 |
- self.sysroot = normalize_path(os.path.abspath(self.sysroot)).rstrip(os.sep) + os.sep |
36 |
+ self.sysroot = normalize_path(os.path.abspath(self.sysroot or os.sep)).rstrip(os.sep) + os.sep |
37 |
|
38 |
self.esysroot = self.sysroot.rstrip(os.sep) + self.eprefix + os.sep |