aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiktor w brodlo <wiktor@brodlo.net>2011-07-05 15:38:30 +0000
committerwiktor w brodlo <wiktor@brodlo.net>2011-07-05 15:38:30 +0000
commitc8bcb76be0986f5f3122a8dfbf0851908041cbc9 (patch)
tree739fc76d904ec91f5aaaa8e806a50ae0a42e4f2a /gentoo/utils.py
parentgentoo/utils.py: copy more packages into the local portage tree (diff)
downloadanaconda-c8bcb76be0986f5f3122a8dfbf0851908041cbc9.tar.gz
anaconda-c8bcb76be0986f5f3122a8dfbf0851908041cbc9.tar.bz2
anaconda-c8bcb76be0986f5f3122a8dfbf0851908041cbc9.zip
gentoo/utils.py: a nice trick to unmask packages temporarily
Diffstat (limited to 'gentoo/utils.py')
-rw-r--r--gentoo/utils.py50
1 files changed, 10 insertions, 40 deletions
diff --git a/gentoo/utils.py b/gentoo/utils.py
index 1969d42..b10ebcf 100644
--- a/gentoo/utils.py
+++ b/gentoo/utils.py
@@ -268,42 +268,12 @@ class GentooInstall:
# del self._settings[sys_settings_plg_id]['misc']['configprotectskip'][:]
def install_package(self, atom, match = None, silent = False, fetch = False):
-
- #if silent and os.getenv('GENTOO_DEBUG'):
- # silent = False
-
- #chroot = self._root
- #root = etpSys['rootdir']
- # Doesn't matter, Portage chroots in the terminal if needed
- #if chroot != root:
- # self._change_entropy_chroot(chroot)
-
- #if match is None:
- # match = self._entropy.atom_match(atom)
- #oldstdout = sys.stdout
-
- #if silent:
- # sys.stdout = STDERR_LOG
- # etpUi['mute'] = True
-
- #try:
- # rc = 0
- # if match[0] != -1:
- # Package = self._entropy.Package()
- # action = "install"
- # if fetch:
- # action = "fetch"
- # Package.prepare(match, action)
- # rc = Package.run()
- # Package.kill()
- #finally:
- # if silent:
- # sys.stdout = oldstdout
- # etpUi['mute'] = False
- # if chroot != root:
- # self._change_entropy_chroot(root)
-
return self._portage.install(atom)
+
+ def install_masked_package(self, atom):
+ os.environ["ACCEPT_KEYWORDS"] = "~amd64 ~x86"
+ return self._portage.install(atom)
+ del os.environ["ACCEPT_KEYWORDS"]
# TODO: We don't remove anything from stage3
def remove_package(self, atom, match = None, silent = False):
@@ -1070,15 +1040,15 @@ class GentooInstall:
def install_setup_tools(self):
self._progress.set_fraction(0.0)
self._progress.set_text(_("Installing configuration helpers"))
- self.install_package("-1 system-config-date")
+ self.install_masked_package("-1 system-config-date")
self._progress.set_fraction(0.2)
- self.install_package("-1 system-config-keyboard")
+ self.install_masked_package("-1 system-config-keyboard")
self._progress.set_fraction(0.4)
- self.install_package("-1 system-config-users")
+ self.install_masked_package("-1 system-config-users")
self._progress.set_fraction(0.6)
- self.install_package("-1 keyboard-configuration-helpers")
+ self.install_masked_package("-1 keyboard-configuration-helpers")
self._progress.set_fraction(0.8)
- self.install_package("-1 language-configuration-helpers")
+ self.install_masked_package("-1 language-configuration-helpers")
self._progress.set_fraction(1.0)
def set_profile(self):