diff options
Diffstat (limited to '')
-rw-r--r-- | portato/backend/catapult/system.py | 24 | ||||
-rw-r--r-- | portato/backend/portage/system.py | 3 | ||||
-rw-r--r-- | portato/backend/system_interface.py | 9 |
3 files changed, 18 insertions, 18 deletions
diff --git a/portato/backend/catapult/system.py b/portato/backend/catapult/system.py index 3d913e4..5ae01b6 100644 --- a/portato/backend/catapult/system.py +++ b/portato/backend/catapult/system.py @@ -209,9 +209,6 @@ class CatapultSystem (SystemInterface): def get_config_path (self): return str(self.proxy.get_config_path()) - def get_world_file_path (self): - return str(self.proxy.get_world_file_path()) - def get_sync_command (self): return [str(x) for x in self.proxy.get_sync_command()] @@ -237,6 +234,21 @@ class CatapultSystem (SystemInterface): return [str(x) for x in self.proxy.get_unmerge_option()] def get_environment (self): - env = self.proxy.get_environment() - env.update(TERM = "xterm") # emulate terminal :) - return env + default_opts = self.get_global_settings("EMERGE_DEFAULT_OPTS") + opts = dict(os.environ) + + if default_opts: + opt_list = default_opts.split() + changed = False + + for option in ["--ask", "-a", "--pretend", "-p"]: + if option in opt_list: + opt_list.remove(option) + changed = True + + if changed: + opts.update(EMERGE_DEFAULT_OPTS = " ".join(opt_list)) + + opts.update(TERM = "xterm") + + return opts diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py index 5b9e6cf..13ec76e 100644 --- a/portato/backend/portage/system.py +++ b/portato/backend/portage/system.py @@ -42,9 +42,6 @@ class PortageSystem (SystemInterface): def get_config_path (self): return portage.USER_CONFIG_PATH - def get_world_file_path (self): - return portage.WORLD_FILE - def get_merge_command (self): return ["/usr/bin/python", "/usr/bin/emerge"] diff --git a/portato/backend/system_interface.py b/portato/backend/system_interface.py index 43a44ad..a523af7 100644 --- a/portato/backend/system_interface.py +++ b/portato/backend/system_interface.py @@ -299,15 +299,6 @@ class SystemInterface (object): raise NotImplementedError - def get_world_file_path (self): - """Returns the path to the world file. - - @returns: the path of the world file - @rtype: string - """ - - raise NotImplementedError - def get_sync_command (self): """Returns the command(s) to run for syncing. This can be overridden by the user. |