Subject: [PATCH 1/2] stagebase.py: strip leading slash from /etc/portage in pjoin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Subject: [PATCH 1/2] stagebase.py: strip leading slash from /etc/portage in pjoin

Ben Kohler
Only the first component passed to pjoin can have a leading slash,
otherwise the component will be treated as an absolute path and all
preceding components are discarded.
---
catalyst/base/stagebase.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a6a32f5a..999bf8df 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1219,7 +1219,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                       "sticky-config" not in self.settings["options"]):
                       for _dir in "keywords", "mask", "unmask", "use":
                               target = pjoin([self.settings['chroot_path'],
-                                       "/etc/portage/package.%s" % _dir,
+                                       "etc/portage/package.%s" % _dir,
                                       self.settings["portage_prefix"]])
                               clear_path(target)

--
2.13.6

~