From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 189C3138010 for ; Tue, 16 Oct 2012 23:16:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4D88CE02F0; Tue, 16 Oct 2012 23:16:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B4ADBE02F0 for ; Tue, 16 Oct 2012 23:16:09 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E76A533D972 for ; Tue, 16 Oct 2012 23:16:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 961E9E5436 for ; Tue, 16 Oct 2012 23:16:07 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1350429346.43f3b93d4841ce638e73586a8d7b212f86f0c173.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py pym/_emerge/main.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 43f3b93d4841ce638e73586a8d7b212f86f0c173 X-VCS-Branch: master Date: Tue, 16 Oct 2012 23:16:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6e1e4435-6418-44dc-8a28-46e434c7a19c X-Archives-Hash: 803f8de2434e8c501c5a261de164bfab commit: 43f3b93d4841ce638e73586a8d7b212f86f0c173 Author: Zac Medico gentoo org> AuthorDate: Tue Oct 16 23:15:46 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Oct 16 23:15:46 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=43f3b93d emerge: optimize --moo, remove deprecated moo The --moo action is fast like --help now. The "moo" argument has been deprecated since bug #389609, and is now removed. --- pym/_emerge/actions.py | 28 ++-------------------------- pym/_emerge/main.py | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index c403d89..fb80173 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -87,21 +87,6 @@ if sys.hexversion >= 0x3000000: else: _unicode = unicode -COWSAY_MOO = """ - - Larry loves Gentoo (%s) - - _______________________ -< Have you mooed today? > - ----------------------- - \ ^__^ - \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || - -""" - def action_build(settings, trees, mtimedb, myopts, myaction, myfiles, spinner): @@ -3522,13 +3507,6 @@ def run_action(settings, trees, mtimedb, myaction, myopts, myfiles, del mytrees, mydb - if "moo" in myfiles: - print(COWSAY_MOO % platform.system()) - msg = ("The above `emerge moo` display is deprecated. " - "Please use `emerge --moo` instead.") - for line in textwrap.wrap(msg, 50): - print(" %s %s" % (colorize("WARN", "*"), line)) - for x in myfiles: ext = os.path.splitext(x)[1] if (ext == ".ebuild" or ext == ".tbz2") and \ @@ -3538,10 +3516,8 @@ def run_action(settings, trees, mtimedb, myaction, myopts, myfiles, break root_config = trees[settings['EROOT']]['root_config'] - if myaction == "moo": - print(COWSAY_MOO % platform.system()) - return os.EX_OK - elif myaction == "list-sets": + + if myaction == "list-sets": writemsg_stdout("".join("%s\n" % s for s in sorted(root_config.sets))) return os.EX_OK elif myaction == "check-news": diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index d31d99a..ef91fc6 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -3,6 +3,7 @@ from __future__ import print_function +import platform import sys import portage @@ -67,6 +68,21 @@ shortmapping={ "v":"--verbose", "V":"--version" } +COWSAY_MOO = """ + + Larry loves Gentoo (%s) + + _______________________ +< Have you mooed today? > + ----------------------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || + +""" + def multiple_actions(action1, action2): sys.stderr.write("\n!!! Multiple actions requested... Please choose one only.\n") sys.stderr.write("!!! '%s' or '%s'\n\n" % (action1, action2)) @@ -982,6 +998,9 @@ def emerge_main(args=None): if myaction == "help": emerge_help() return os.EX_OK + elif myaction == "moo": + print(COWSAY_MOO % platform.system()) + return os.EX_OK # Portage needs to ensure a sane umask for the files it creates. os.umask(0o22)