aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2014-10-02 20:48:26 +0200
committerFabian Groffen <grobian@gentoo.org>2014-10-02 20:48:26 +0200
commitafca65a3d4a71a04ae71a60b0a3057ad0a69a25e (patch)
treed8e14f73112416320b4fbcd40f6a74ef787f0a58
parentportageq: fix backtrace due to changed variable (diff)
parentFix travis test failures due to setup.py installing future sbin scripts in bi... (diff)
downloadportage-afca65a3d4a71a04ae71a60b0a3057ad0a69a25e.tar.gz
portage-afca65a3d4a71a04ae71a60b0a3057ad0a69a25e.tar.bz2
portage-afca65a3d4a71a04ae71a60b0a3057ad0a69a25e.zip
Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
-rw-r--r--man/emerge.13
-rw-r--r--pym/_emerge/actions.py2
-rw-r--r--pym/_emerge/main.py13
-rw-r--r--pym/portage/tests/__init__.py4
4 files changed, 20 insertions, 2 deletions
diff --git a/man/emerge.1 b/man/emerge.1
index 169d34c9b..c9c57214a 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -716,6 +716,9 @@ Disable the warning message that's shown prior to
to be set in the \fBmake.conf\fR(5)
\fBEMERGE_DEFAULT_OPTS\fR variable.
.TP
+.BR "\-\-read-news [ y | n ]"
+Offer to read news via eselect if there are unread news.
+.TP
.BR "\-\-rebuild\-if\-new\-slot [ y | n ]"
Automatically rebuild or reinstall packages when slot/sub\-slot :=
operator dependencies can be satisfied by a newer slot, so that
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 9f34f545c..9ca071f91 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -4065,7 +4065,7 @@ def run_action(emerge_config):
uq = UserQuery(emerge_config.opts)
if display_news_notification(emerge_config.target_config,
emerge_config.opts) \
- and "--ask" in emerge_config.opts \
+ and "--read-news" in emerge_config.opts \
and uq.query("Would you like to read the news items while " \
"calculating dependencies?",
'--ask-enter-invalid' in emerge_config.opts) == "Yes":
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index e2ddf8700..567cf29ad 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -147,6 +147,7 @@ def insert_optional_args(args):
'--quiet' : y_or_n,
'--quiet-build' : y_or_n,
'--quiet-fail' : y_or_n,
+ '--read-news' : y_or_n,
'--rebuild-if-new-slot': y_or_n,
'--rebuild-if-new-rev' : y_or_n,
'--rebuild-if-new-ver' : y_or_n,
@@ -558,6 +559,12 @@ def parse_opts(tmpcmdline, silent=False):
"choices" : true_y_or_n,
},
+ "--read-news": {
+ "help" : "offer to read unread news via eselect",
+ "choices" : true_y_or_n
+ },
+
+
"--rebuild-if-new-slot": {
"help" : ("Automatically rebuild or reinstall packages when slot/sub-slot := "
"operator dependencies can be satisfied by a newer slot, so that "
@@ -804,6 +811,12 @@ def parse_opts(tmpcmdline, silent=False):
if myoptions.quiet_fail in true_y:
myoptions.quiet_fail = 'y'
+ if myoptions.read_news in true_y:
+ myoptions.read_news = True
+ else:
+ myoptions.read_news = None
+
+
if myoptions.rebuild_if_new_slot in true_y:
myoptions.rebuild_if_new_slot = 'y'
diff --git a/pym/portage/tests/__init__.py b/pym/portage/tests/__init__.py
index 708dd5934..afa57e3a0 100644
--- a/pym/portage/tests/__init__.py
+++ b/pym/portage/tests/__init__.py
@@ -197,7 +197,9 @@ class TestCase(unittest.TestCase):
self.cnf_path = cnf_path
self.cnf_etc_path = cnf_etc_path
self.bindir = cnf_bindir
- self.sbindir = cnf_sbindir
+ # sbin scripts are installed by setup.py to the bindir
+ # they are relocated to /usr/sbin dir by the ebuild later
+ self.sbindir = self.bindir
def defaultTestResult(self):
return TextTestResult()