summaryrefslogtreecommitdiff
path: root/portato/backend
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-10-28 00:30:09 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-10-28 00:35:58 +0100
commit1b1cc8e9cc9203a93c0d77981e56e79b5f7e1098 (patch)
tree548eb09c8d50040e81c402df7cc778c9c0d80997 /portato/backend
parentbc35d41079ffac6fa653d1705dc7776c392eff8d (diff)
downloadportato-1b1cc8e9cc9203a93c0d77981e56e79b5f7e1098.tar.gz
portato-1b1cc8e9cc9203a93c0d77981e56e79b5f7e1098.tar.bz2
portato-1b1cc8e9cc9203a93c0d77981e56e79b5f7e1098.zip
Corrected config path handling.
Now also the 2.1 portage does not include / anymore. Handle this. (cherry picked from commit 58c5b49ae6d822f07879bf7f6a87271b77e7e75d)
Diffstat (limited to 'portato/backend')
-rw-r--r--portato/backend/portage/system.py7
-rw-r--r--portato/backend/portage/system_22.py8
2 files changed, 6 insertions, 9 deletions
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py
index d7c7806..94553c6 100644
--- a/portato/backend/portage/system.py
+++ b/portato/backend/portage/system.py
@@ -68,7 +68,12 @@ class PortageSystem (SystemInterface):
return PortagePackage(cpv)
def get_config_path (self):
- return portage.USER_CONFIG_PATH
+ path = portage.USER_CONFIG_PATH
+
+ if path[0] != "/":
+ return os.path.join(self.settings.settings["ROOT"], path)
+ else:
+ return path
def get_merge_command (self):
return ["/usr/bin/python", "/usr/bin/emerge"]
diff --git a/portato/backend/portage/system_22.py b/portato/backend/portage/system_22.py
index f69e15c..d720a06 100644
--- a/portato/backend/portage/system_22.py
+++ b/portato/backend/portage/system_22.py
@@ -63,11 +63,3 @@ class PortageSystem_22 (PortageSystem):
def new_package (self, cpv):
return PortagePackage_22(cpv)
-
- def get_config_path (self):
- path = PortageSystem.get_config_path(self)
-
- if path[0] != "/":
- return os.path.join(self.settings.settings["ROOT"], path)
- else:
- return path