Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 517310 - emerge: --ask could ask to read pending news items
Summary: emerge: --ask could ask to read pending news items
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 484436
  Show dependency tree
 
Reported: 2014-07-17 09:26 UTC by Fabian Groffen
Modified: 2014-12-04 06:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes the bug (0001-Offer-to-read-news-while-calcing-deps-bug-517310.patch,2.01 KB, patch)
2014-08-12 08:17 UTC, Alexander Berntsen (RETIRED)
Details | Diff
emerge --read-news: prompt only if --ask (emerge-read-news-prompt-only-if-ask.patch,1.52 KB, patch)
2014-10-20 20:09 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2014-07-17 09:26:45 UTC
Currently, emerge behaves as follows:


(principia:~) # emerge -Dua world

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


These are the packages that would be merged, in order:

Calculating dependencies /

...

Would you like to merge these packages? [Yes/No] 


At this point, a wise user enters "no" and does eselect news read.  However since --ask is in action, perhaps emerge could ask after the "IMPORTANT" message whether the user wants to read those pending news items (maybe even during dependency calculations) such that it is not necessary to abort and start emerge again.

I guess a simple "eselect news read" call would do, after which emerge would simply resume what it was doing.
Comment 1 Alexander Berntsen (RETIRED) gentoo-dev 2014-07-17 11:27:24 UTC
There's this notion that emerge should not be interactive apart from the merge question. autounmasking is an exception. Personally I don't see a problem with your suggestion. It makes sense. You would not want to waste time calculating dependencies twice.

If I see no objections within a week or two, I'll go ahead and implement this.

Thanks for the idea.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-07-24 20:01:18 UTC
Well, I'm not really sure about changing interactivity here. You can always do ^z or use another terminal to read the news. But it's just a matter of habit.
Comment 3 Alexander Berntsen (RETIRED) gentoo-dev 2014-08-12 08:17:14 UTC
Created attachment 382716 [details, diff]
Fixes the bug
Comment 5 Brian Dolbec gentoo-dev 2014-09-27 19:40:01 UTC
This is released in portage-2.2.14_rc1
Comment 6 Lars Wendler (Polynomial-C) gentoo-dev 2014-09-28 07:38:36 UTC
Reopening. 

I'd like to request having this feature optional. Either through FEATURES or --option. Otherwise it totally disturbs my workflow with portage which I have for years.

Thanks.
Comment 7 Alexander Berntsen (RETIRED) gentoo-dev 2014-09-30 07:19:04 UTC
It's its own option in git now.
Comment 8 Zac Medico gentoo-dev 2014-10-20 19:38:21 UTC
(In reply to Alexander Berntsen from comment #7)
> It's its own option in git now.

Looking at the changes:

https://github.com/gentoo/portage/commit/7d605312d48ae5f7755f640ef78c97b424399bd0

That may be the only UserQuery that is not conditional on --ask (it's conditional on --read-news instead). Maybe it should be conditional on both?
Comment 9 Zac Medico gentoo-dev 2014-10-20 20:09:13 UTC
Created attachment 387084 [details, diff]
emerge --read-news: prompt only if --ask

This patch makes --read-news have no effect unless --ask is enabled.
Comment 10 Alexander Berntsen (RETIRED) gentoo-dev 2014-10-21 07:12:30 UTC
I don't care particularly much. Patch looks good to me. Go ahead and push it.
Comment 11 Zac Medico gentoo-dev 2014-10-21 23:17:47 UTC
(In reply to Alexander Berntsen from comment #10)
> I don't care particularly much. Patch looks good to me. Go ahead and push it.

Thanks, it's in git now:

https://github.com/gentoo/portage/commit/3a22c197d00b81efeb78fe75359b49316844c2e2
Comment 13 Brian Dolbec gentoo-dev 2014-12-04 06:08:38 UTC
This is in the portage-2.2.15 release.