diff options
Diffstat (limited to '')
-rw-r--r-- | doc/Changelog | 1 | ||||
-rw-r--r-- | doc/TODO | 7 | ||||
-rw-r--r-- | portato/backend/portage/system.py | 12 | ||||
-rw-r--r-- | portato/backend/system_interface.py | 8 | ||||
-rw-r--r-- | portato/gui/gui_helper.py | 2 |
5 files changed, 27 insertions, 3 deletions
diff --git a/doc/Changelog b/doc/Changelog index 90c507a..cbe9603 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ next: - added name of overlay the package comes from +- filtering "--ask" from EMERGE_DEFAULT_OPTS 0.7.3: - fixed bugs @@ -13,13 +13,16 @@ Backend: - only remove already merged packages from queue - make sure, a package being removed from the queue is not needed as a dependency by another package -- filter "--ask" from EMERGE_DEFAULT_OPTS - GUI: ==== - show current emerge process in Window-Title (similar to the Console) - return from console after finishing emerge +- show reason for masked packages + +Main Point: user preferences: + - window size / location + - farben und schriftgrößen GTK: ---- 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 diff --git a/portato/gui/gui_helper.py b/portato/gui/gui_helper.py index df4e1d7..9907a1c 100644 --- a/portato/gui/gui_helper.py +++ b/portato/gui/gui_helper.py @@ -513,7 +513,7 @@ class EmergeQueue: self.console.set_pty(master) # start emerge - self.process = Popen(command+options+packages, stdout = slave, stderr = STDOUT, shell = False) + self.process = Popen(command+options+packages, stdout = slave, stderr = STDOUT, shell = False, env = system.get_environment()) # start thread waiting for the stop of emerge Thread(name="Emerge-Thread", target=self._update_packages, args=(packages+self.deps.keys(),)).start() |