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 1QSdQJ-0008Sb-62 for garchives@archives.gentoo.org; Fri, 03 Jun 2011 23:04:59 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 537111C029; Fri, 3 Jun 2011 23:04:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 1DD781C029 for ; Fri, 3 Jun 2011 23:04:50 +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 A08A91B402B for ; Fri, 3 Jun 2011 23:04:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id EDFF280506 for ; Fri, 3 Jun 2011 23:04:48 +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: <7425033c9da717ef2c48e7435bcce248531f9df6.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: 7425033c9da717ef2c48e7435bcce248531f9df6 Date: Fri, 3 Jun 2011 23:04:48 +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: e21f91dcf26b376866fdb1460745af8c commit: 7425033c9da717ef2c48e7435bcce248531f9df6 Author: Zac Medico gentoo org> AuthorDate: Fri Jun 3 23:03:40 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Jun 3 23:03:40 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D7425033c --ask: prompt for --pretend mode when necessary --- pym/_emerge/main.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 11d8ca1..ea3282a 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -45,6 +45,7 @@ from _emerge.emergelog import emergelog from _emerge._flush_elog_mod_echo import _flush_elog_mod_echo from _emerge.is_valid_package_atom import is_valid_package_atom from _emerge.stdout_spinner import stdout_spinner +from _emerge.userquery import userquery =20 if sys.hexversion >=3D 0x3000000: long =3D int @@ -1729,10 +1730,13 @@ def emerge_main(args=3DNone): # access is required but the user is not in the portage group. from portage.data import portage_group_warning if "--ask" in myopts: + writemsg_stdout("This action requires %s access...\n" % \ + (access_desc,), noiselevel=3D-1) + if userquery("Would you like to add --pretend to options?", + "--ask-enter-invalid" in myopts) =3D=3D "No": + return 1 myopts["--pretend"] =3D True del myopts["--ask"] - print(("%s access is required... " + \ - "adding --pretend to options\n") % access_desc) if portage.secpass < 1 and not need_superuser: portage_group_warning() else: