From 43f3b93d4841ce638e73586a8d7b212f86f0c173 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 16 Oct 2012 16:15:46 -0700 Subject: 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/main.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'pym/_emerge/main.py') diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index d31d99ae4..ef91fc62d 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) -- cgit v1.2.3-1-g7c22