Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 517310

Summary: emerge: --ask could ask to read pending news items
Product: Portage Development Reporter: Fabian Groffen <grobian>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: enhancement CC: pacho
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 484436    
Attachments: Fixes the bug
emerge --read-news: prompt only if --ask

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 (RETIRED) gentoo-dev 2014-09-27 19:40:01 UTC
This is released in portage-2.2.14_rc1
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) 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 (RETIRED) gentoo-dev 2014-12-04 06:08:38 UTC
This is in the portage-2.2.15 release.