From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qe7iB-0003DJ-NZ for garchives@archives.gentoo.org; Tue, 05 Jul 2011 15:38:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D28CF21C126; Tue, 5 Jul 2011 15:38:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9726121C126 for ; Tue, 5 Jul 2011 15:38:48 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 092E71B401B for ; Tue, 5 Jul 2011 15:38:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 652B48003D for ; Tue, 5 Jul 2011 15:38:47 +0000 (UTC) From: "Wiktor W Brodlo" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Wiktor W Brodlo" Message-ID: Subject: [gentoo-commits] proj/anaconda:master commit in: gentoo/ X-VCS-Repository: proj/anaconda X-VCS-Files: gentoo/utils.py X-VCS-Directories: gentoo/ X-VCS-Committer: wiktor X-VCS-Committer-Name: Wiktor W Brodlo X-VCS-Revision: c8bcb76be0986f5f3122a8dfbf0851908041cbc9 Date: Tue, 5 Jul 2011 15:38:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 0440694ad54a28481a47c219456ff309 commit: c8bcb76be0986f5f3122a8dfbf0851908041cbc9 Author: wiktor w brodlo brodlo net> AuthorDate: Tue Jul 5 15:38:30 2011 +0000 Commit: Wiktor W Brodlo brodlo net> CommitDate: Tue Jul 5 15:38:30 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/anaconda.git;= a=3Dcommit;h=3Dc8bcb76b gentoo/utils.py: a nice trick to unmask packages temporarily --- gentoo/utils.py | 50 ++++++++++---------------------------------------= - 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']['configprotects= kip'][:] =20 def install_package(self, atom, match =3D None, silent =3D False, fe= tch =3D False): - - #if silent and os.getenv('GENTOO_DEBUG'): - # silent =3D False - - #chroot =3D self._root - #root =3D etpSys['rootdir'] - # Doesn't matter, Portage chroots in the terminal if needed - #if chroot !=3D root: - # self._change_entropy_chroot(chroot) - - #if match is None: - # match =3D self._entropy.atom_match(atom) - #oldstdout =3D sys.stdout - - #if silent: - # sys.stdout =3D STDERR_LOG - # etpUi['mute'] =3D True - - #try: - # rc =3D 0 - # if match[0] !=3D -1: - # Package =3D self._entropy.Package() - # action =3D "install" - # if fetch: - # action =3D "fetch" - # Package.prepare(match, action) - # rc =3D Package.run() - # Package.kill() - #finally: - # if silent: - # sys.stdout =3D oldstdout - # etpUi['mute'] =3D False - # if chroot !=3D root: - # self._change_entropy_chroot(root) - return self._portage.install(atom) + =20 + def install_masked_package(self, atom): + os.environ["ACCEPT_KEYWORDS"] =3D "~amd64 ~x86" + return self._portage.install(atom) + del os.environ["ACCEPT_KEYWORDS"] =20 # TODO: We don't remove anything from stage3 def remove_package(self, atom, match =3D None, silent =3D 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") =20 + self.install_masked_package("-1 system-config-date") =20 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) =20 def set_profile(self):