diff options
author | necoro <> | 2007-05-14 18:52:04 +0000 |
---|---|---|
committer | necoro <> | 2007-05-14 18:52:04 +0000 |
commit | 48a4f88747307ce41a07b4fa55411b44b9269eb7 (patch) | |
tree | b5d978867f74aedb2183d862758075f6ce255f49 /portato/backend | |
parent | be5997284de46af17f1e169dc94beb9e85462dd3 (diff) | |
download | portato-48a4f88747307ce41a07b4fa55411b44b9269eb7.tar.gz portato-48a4f88747307ce41a07b4fa55411b44b9269eb7.tar.bz2 portato-48a4f88747307ce41a07b4fa55411b44b9269eb7.zip |
filtering "--ask" fron EMERGE_DEFAULT_OPTS
Diffstat (limited to '')
-rw-r--r-- | portato/backend/portage/system.py | 12 | ||||
-rw-r--r-- | portato/backend/system_interface.py | 8 |
2 files changed, 20 insertions, 0 deletions
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py index c42ca46..2d90c24 100644 --- a/portato/backend/portage/system.py +++ b/portato/backend/portage/system.py @@ -60,6 +60,18 @@ class PortageSystem (SystemInterface): def get_unmerge_option (self): return ["--unmerge"] + def get_environment (self): + default_opts = self.get_global_settings("EMERGE_DEFAULT_OPTS") + opts = dict(os.environ) + + if default_opts: + opt_list = default_opts.split() + if "--ask" in opt_list: + opt_list.remove("--ask") + opts.update(EMERGE_DEFAULT_OPTS = " ".join(opt_list)) + + return opts + def find_lambda (self, name): """Returns the function needed by all the find_all_*-functions. Returns None if no name is given. diff --git a/portato/backend/system_interface.py b/portato/backend/system_interface.py index f37d0a0..40834f9 100644 --- a/portato/backend/system_interface.py +++ b/portato/backend/system_interface.py @@ -291,3 +291,11 @@ class SystemInterface: @rtype: string[]""" raise NotImplementedError + + def get_environment (self): + """Returns a dictionary of environment variables to set prior to do an emerge. + + @returns: environment variables + @rtype: dict{string : string}""" + + raise NotImplementedError |