1 |
When ROOT or PORTAGE_CONFIGROOT is entirely empty, map |
2 |
the value to / since otherwise is becomes the current |
3 |
working directory which gives undesirable results. |
4 |
|
5 |
Bug: https://bugs.gentoo.org/663904 |
6 |
--- |
7 |
lib/portage/package/ebuild/_config/LocationsManager.py | 5 ++--- |
8 |
1 file changed, 2 insertions(+), 3 deletions(-) |
9 |
|
10 |
diff --git a/lib/portage/package/ebuild/_config/LocationsManager.py b/lib/portage/package/ebuild/_config/LocationsManager.py |
11 |
index f7d7209ff..b8a4ccdd0 100644 |
12 |
--- a/lib/portage/package/ebuild/_config/LocationsManager.py |
13 |
+++ b/lib/portage/package/ebuild/_config/LocationsManager.py |
14 |
@@ -60,7 +60,7 @@ class LocationsManager(object): |
15 |
self.config_root = portage.const.EPREFIX + os.sep |
16 |
|
17 |
self.config_root = normalize_path(os.path.abspath( |
18 |
- self.config_root)).rstrip(os.path.sep) + os.path.sep |
19 |
+ self.config_root or os.sep)).rstrip(os.path.sep) + os.path.sep |
20 |
|
21 |
self._check_var_directory("PORTAGE_CONFIGROOT", self.config_root) |
22 |
self.abs_user_config = os.path.join(self.config_root, USER_CONFIG_PATH) |
23 |
@@ -304,8 +304,7 @@ class LocationsManager(object): |
24 |
self.target_root = root_overwrite |
25 |
if not self.target_root.strip(): |
26 |
self.target_root = None |
27 |
- if self.target_root is None: |
28 |
- self.target_root = "/" |
29 |
+ self.target_root = self.target_root or os.sep |
30 |
|
31 |
self.target_root = normalize_path(os.path.abspath( |
32 |
self.target_root)).rstrip(os.path.sep) + os.path.sep |
33 |
-- |
34 |
2.16.4 |