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 1PzBwi-0003Pq-P1 for garchives@archives.gentoo.org; Mon, 14 Mar 2011 17:52:44 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5B0471C008; Mon, 14 Mar 2011 17:52:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 151A01C008 for ; Mon, 14 Mar 2011 17:52:37 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 909F31B40B0 for ; Mon, 14 Mar 2011 17:52:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id ECF038006A for ; Mon, 14 Mar 2011 17:52:35 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <9bdc01a9ef0c5c6373a4a4ac5ad288dc9018372c.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: man/, pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: man/emerge.1 pym/_emerge/help.py pym/_emerge/main.py X-VCS-Directories: man/ pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 9bdc01a9ef0c5c6373a4a4ac5ad288dc9018372c Date: Mon, 14 Mar 2011 17:52:35 +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: 33e39171d6c491eb268066037b0232b1 commit: 9bdc01a9ef0c5c6373a4a4ac5ad288dc9018372c Author: Zac Medico gentoo org> AuthorDate: Mon Mar 14 17:52:17 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Mar 14 17:52:17 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D9bdc01a9 emerge: support [ y | n ] for --quiet This allows --quiet and --quiet-build to be enabled via EMERGE_DEFAULT_OPTS, and then temporarily disabled via the command- line. --- man/emerge.1 | 6 +++--- pym/_emerge/help.py | 7 +++++-- pym/_emerge/main.py | 29 ++++++++++++++++++++++++++--- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/man/emerge.1 b/man/emerge.1 index 42bd398..0e3eb13 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -1,4 +1,4 @@ -.TH "EMERGE" "1" "Feb 2011" "Portage VERSION" "Portage" +.TH "EMERGE" "1" "Mar 2011" "Portage VERSION" "Portage" .SH "NAME" emerge \- Command\-line interface to the Portage system .SH "SYNOPSIS" @@ -514,11 +514,11 @@ B blocked by another package (unresolved conflict) b blocked by another package (automatically resolved conflict) .TE .TP -.BR "\-\-quiet " (\fB\-q\fR) +.BR "\-\-quiet [ y | n ] (\-q short option)" Results may vary, but the general outcome is a reduced or condensed output from portage's displays. .TP -.BR \-\-quiet\-build +.BR "\-\-quiet\-build [ y | n ]" Redirect all build output to logs alone, and do not display it on stdout. .TP diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py index 2f8b342..020bc42 100644 --- a/pym/_emerge/help.py +++ b/pym/_emerge/help.py @@ -578,11 +578,14 @@ def help(myopts, havecolor=3D1): print(" printed out accompanied by a '+' for enabled and = a '-' for") print(" disabled USE flags.") print() - print(" "+green("--quiet")+" ("+green("-q")+" short option)") + print(" " + green("--quiet") + \ + " [ %s | %s ] (%s short option)" % \ + (turquoise("y"), turquoise("n"), green("-q"))) print(" Effects vary, but the general outcome is a reduce= d or condensed") print(" output from portage's displays.") print() - print(" "+green("--quiet-build")) + print(" " + green("--quiet-build") + \ + " [ %s | %s ]" % (turquoise("y"), turquoise("n"))) desc =3D "Redirect all build output to logs alone, and do not " + \ "display it on stdout." for line in wrap(desc, desc_width): diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index fb75ba9..f061ae4 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -65,8 +65,6 @@ options=3D[ "--nodeps", "--noreplace", "--nospinner", "--oneshot", "--onlydeps", "--pretend", -"--quiet", -"--quiet-build", "--quiet-unmerge-warn", "--resume", "--searchdesc", @@ -91,7 +89,6 @@ shortmapping=3D{ "n":"--noreplace", "N":"--newuse", "o":"--onlydeps", "O":"--nodeps", "p":"--pretend", "P":"--prune", -"q":"--quiet", "r":"--resume", "s":"--search", "S":"--searchdesc", "t":"--tree", @@ -437,6 +434,8 @@ def insert_optional_args(args): '--jobs' : valid_integers, '--keep-going' : y_or_n, '--package-moves' : y_or_n, + '--quiet' : y_or_n, + '--quiet-build' : y_or_n, '--rebuilt-binaries' : y_or_n, '--root-deps' : ('rdeps',), '--select' : y_or_n, @@ -462,6 +461,7 @@ def insert_optional_args(args): 'G' : y_or_n, 'k' : y_or_n, 'K' : y_or_n, + 'q' : y_or_n, } =20 arg_stack =3D args[:] @@ -697,6 +697,19 @@ def parse_opts(tmpcmdline, silent=3DFalse): "choices" : true_y_or_n }, =20 + "--quiet": { + "shortopt" : "-q", + "help" : "reduced or condensed output", + "type" : "choice", + "choices" : true_y_or_n + }, + + "--quiet-build": { + "help" : "redirect build output to logs", + "type" : "choice", + "choices" : true_y_or_n + }, + "--rebuilt-binaries": { "help" : "replace installed packages with binary " + \ "packages that have been rebuilt", @@ -869,6 +882,16 @@ def parse_opts(tmpcmdline, silent=3DFalse): if myoptions.package_moves in true_y: myoptions.package_moves =3D True =20 + if myoptions.quiet in true_y: + myoptions.quiet =3D True + else: + myoptions.quiet =3D None + + if myoptions.quiet_build in true_y: + myoptions.quiet_build =3D True + else: + myoptions.quiet_build =3D None + if myoptions.rebuilt_binaries in true_y: myoptions.rebuilt_binaries =3D True =20