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 1RNIHa-0003CM-0t for garchives@archives.gentoo.org; Mon, 07 Nov 2011 06:02:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 374AD21C05F; Mon, 7 Nov 2011 06:02:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0721121C057 for ; Mon, 7 Nov 2011 06:02:01 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 72C651B4018 for ; Mon, 7 Nov 2011 06:02:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id A58BB80042 for ; Mon, 7 Nov 2011 06:02:00 +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: <9929eaf3e50897c814062bec5a704898e085d048.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/main.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 9929eaf3e50897c814062bec5a704898e085d048 Date: Mon, 7 Nov 2011 06:02:00 +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: 7a1d37cf-6fbc-4416-b75c-451d3bd2803b X-Archives-Hash: 45c2b0cdefffc8ade28734ec18a71807 commit: 9929eaf3e50897c814062bec5a704898e085d048 Author: Zac Medico gentoo org> AuthorDate: Mon Nov 7 06:01:51 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Nov 7 06:01:51 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D9929eaf3 Add emerge --moo action for bug #389609. --- pym/_emerge/main.py | 41 +++++++++++++++++++++++++---------------- 1 files changed, 25 insertions(+), 16 deletions(-) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 52e4c42..d4a6bd3 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -97,6 +97,21 @@ shortmapping=3D{ "v":"--verbose", "V":"--version" } =20 +COWSAY_MOO =3D """ + + Larry loves Gentoo (%s) + + _______________________ +< Have you mooed today? > + ----------------------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\=20 + ||----w | + || || + +""" + def chk_updated_info_files(root, infodirs, prev_mtimes, retval): =20 if os.path.exists("/usr/bin/install-info"): @@ -592,7 +607,7 @@ def parse_opts(tmpcmdline, silent=3DFalse): =20 actions =3D frozenset([ "clean", "check-news", "config", "depclean", "help", - "info", "list-sets", "metadata", + "info", "list-sets", "metadata", "moo", "prune", "regen", "search", "sync", "unmerge", "version", ]) @@ -1704,20 +1719,11 @@ def emerge_main(args=3DNone): del mytrees, mydb =20 if "moo" in myfiles: - print(""" - - Larry loves Gentoo (""" + platform.system() + """) - - _______________________ -< Have you mooed today? > - ----------------------- - \ ^__^ - \ (oo)\_______ - (__)\ )\/\=20 - ||----w | - || || - -""") + print(COWSAY_MOO % platform.system()) + msg =3D ("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)) =20 for x in myfiles: ext =3D os.path.splitext(x)[1] @@ -1726,7 +1732,10 @@ def emerge_main(args=3DNone): break =20 root_config =3D trees[settings['EROOT']]['root_config'] - if myaction =3D=3D "list-sets": + if myaction =3D=3D "moo": + print(COWSAY_MOO % platform.system()) + return os.EX_OK + elif myaction =3D=3D "list-sets": writemsg_stdout("".join("%s\n" % s for s in sorted(root_config.sets))) return os.EX_OK elif myaction =3D=3D "check-news":