From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: bin/, pym/_emerge/
Date: Sun, 25 Mar 2012 23:20:42 +0000 (UTC) [thread overview]
Message-ID: <1332717619.ac13a18708d6223accb85d12ba895bc121df89c6.zmedico@gentoo> (raw)
commit: ac13a18708d6223accb85d12ba895bc121df89c6
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 25 23:20:19 2012 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Mar 25 23:20:19 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ac13a187
Exit status 128 + SIGINT for --ask 'no' answer.
This will fix bug #409647.
---
bin/repoman | 2 +-
pym/_emerge/actions.py | 10 +++++-----
pym/_emerge/main.py | 2 +-
pym/_emerge/userquery.py | 6 +++---
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/bin/repoman b/bin/repoman
index d393df1..8e19a47 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -2622,7 +2622,7 @@ else:
if options.ask and userquery('Commit changes?', True) != 'Yes':
print("* aborting commit.")
- sys.exit(1)
+ sys.exit(128 + signal.SIGINT)
# Handle the case where committed files have keywords which
# will change and need a priming commit before the Manifest
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index e9d6bd6..0fb4944 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -367,7 +367,7 @@ def action_build(settings, trees, mtimedb,
print()
print("Quitting.")
print()
- return 1
+ return 128 + signal.SIGINT
# Don't ask again (e.g. when auto-cleaning packages after merge)
myopts.pop("--ask", None)
@@ -487,7 +487,7 @@ def action_config(settings, trees, myopts, myfiles):
options.append("X")
idx = userquery("Selection?", enter_invalid, responses=options)
if idx == "X":
- sys.exit(0)
+ sys.exit(128 + signal.SIGINT)
pkg = pkgs[int(idx)-1]
else:
print("The following packages available:")
@@ -501,7 +501,7 @@ def action_config(settings, trees, myopts, myfiles):
print()
if "--ask" in myopts:
if userquery("Ready to configure %s?" % pkg, enter_invalid) == "No":
- sys.exit(0)
+ sys.exit(128 + signal.SIGINT)
else:
print("Configuring pkg...")
print()
@@ -1300,7 +1300,7 @@ def action_deselect(settings, trees, opts, atoms):
prompt = "Would you like to remove these " + \
"packages from your world favorites?"
if userquery(prompt, enter_invalid) == 'No':
- return os.EX_OK
+ return 128 + signal.SIGINT
remaining = set(world_set)
remaining.difference_update(discard_atoms)
@@ -2226,7 +2226,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
print()
print("Quitting.")
print()
- sys.exit(0)
+ sys.exit(128 + signal.SIGINT)
emergelog(xterm_titles, ">>> Starting rsync with " + dosyncuri)
if "--quiet" not in myopts:
print(">>> Starting rsync with "+dosyncuri+"...")
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index cf5f332..0fbc4b7 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -1849,7 +1849,7 @@ def emerge_main(args=None):
portage_group_warning()
if userquery("Would you like to add --pretend to options?",
"--ask-enter-invalid" in myopts) == "No":
- return 1
+ return 128 + signal.SIGINT
myopts["--pretend"] = True
del myopts["--ask"]
else:
diff --git a/pym/_emerge/userquery.py b/pym/_emerge/userquery.py
index e7ed400..efae80a 100644
--- a/pym/_emerge/userquery.py
+++ b/pym/_emerge/userquery.py
@@ -1,8 +1,9 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
+import signal
import sys
from portage.output import bold, create_color_func
@@ -51,5 +52,4 @@ def userquery(prompt, enter_invalid, responses=None, colours=None):
print("Sorry, response '%s' not understood." % response, end=' ')
except (EOFError, KeyboardInterrupt):
print("Interrupted.")
- sys.exit(1)
-
+ sys.exit(128 + signal.SIGINT)
next reply other threads:[~2012-03-25 23:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-25 23:20 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-04-30 19:28 [gentoo-commits] proj/portage:master commit in: bin/, pym/_emerge/ Zac Medico
2018-03-28 6:52 Zac Medico
2015-09-28 16:08 Zac Medico
2013-12-27 18:06 Arfrever Frehtes Taifersar Arahesis
2013-08-03 0:38 Zac Medico
2012-12-29 7:45 Zac Medico
2012-10-14 21:59 Zac Medico
2012-10-06 18:11 Zac Medico
2012-10-06 18:05 Zac Medico
2012-09-15 16:53 Zac Medico
2012-07-18 21:38 Zac Medico
2011-12-10 3:23 Zac Medico
2011-10-29 3:20 Zac Medico
2011-10-28 20:13 Zac Medico
2011-02-22 2:51 Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1332717619.ac13a18708d6223accb85d12ba895bc121df89c6.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox