diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2008-04-01 23:11:11 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2008-04-01 23:11:11 +0200 |
commit | 963ed59d2d4c34cc59f75e82db0410500a2a7524 (patch) | |
tree | a765078fb38b2be67ee960e82bb18febb1231118 /portato/backend/catapult | |
parent | be64a04c8a144a6db941474ed52ee7e14827ca5a (diff) | |
download | portato-963ed59d2d4c34cc59f75e82db0410500a2a7524.tar.gz portato-963ed59d2d4c34cc59f75e82db0410500a2a7524.tar.bz2 portato-963ed59d2d4c34cc59f75e82db0410500a2a7524.zip |
'get_world_file_path' and 'get_environment' removed from catapult API
Diffstat (limited to '')
-rw-r--r-- | portato/backend/catapult/system.py | 24 |
1 files changed, 18 insertions, 6 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 |