Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 587674 - De-couple autounmask functionality from etc-update/dispatch-conf
Summary: De-couple autounmask functionality from etc-update/dispatch-conf
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-01 09:37 UTC by Mike Hodson
Modified: 2016-07-01 11:14 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Hodson 2016-07-01 09:37:28 UTC
I despise updating my /etc files.
In fact, in many years of running gentoo, updating the files in /etc has -caused- far more problems directly versus letting a crufty old config go unchecked for years at a time.

Seriously.  Updating configs breaks more than not updating them (this is in and of itself a serious issue)

So the autounmask-write functionality needs to be de-coupled from the env-update/dispatch-conf mechanism to just allow portage to write to the file -like I told it to- and not have to go through another annoying step to ignore 20 config files I WILL NEVER UPDATE just to get my unmask changes written to a file.

Plus there is NOT ANY VISUAL NOTIFICATION when you execute the command THAT YOU MUST COMPLETE THIS STEP ; it just looks like it does NOTHING externally - and I resorted to using strace to find out what actual file it was claiming to write. 

mike@derp /usr/local/leo-editor $ sudo emerge -va sublime-text           
Password: 

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


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

Calculating dependencies... done!
[ebuild  N     ] app-editors/sublime-text-3114:3::sublime-text  USE="dbus -multislot" 9,110 KiB

Total: 1 package (1 new), Size of downloads: 9,110 KiB

The following license changes are necessary to proceed:
 (see "package.license" in the portage(5) man page for more details)
# required by sublime-text (argument)
>=app-editors/sublime-text-3114 Sublime

Would you like to add these changes to your config files? [Yes/No] 

Autounmask changes successfully written.
mike@derp /usr/local/leo-editor $ sudo emerge -va sublime-text

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


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

Calculating dependencies... done!
[ebuild  N     ] app-editors/sublime-text-3114:3::sublime-text  USE="dbus -multislot" 9,110 KiB

Total: 1 package (1 new), Size of downloads: 9,110 KiB

The following license changes are necessary to proceed:
 (see "package.license" in the portage(5) man page for more details)
# required by sublime-text (argument)
>=app-editors/sublime-text-3114 Sublime

Would you like to add these changes to your config files? [Yes/No] YES

Autounmask changes successfully written.
mike@derp /usr/local/leo-editor $ sudo emerge -va sublime-text

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


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

Calculating dependencies... done!
[ebuild  N     ] app-editors/sublime-text-3114:3::sublime-text  USE="dbus -multislot" 9,110 KiB

Total: 1 package (1 new), Size of downloads: 9,110 KiB

The following license changes are necessary to proceed:
 (see "package.license" in the portage(5) man page for more details)
# required by sublime-text (argument)
>=app-editors/sublime-text-3114 Sublime

Would you like to add these changes to your config files? [Yes/No] GODDAMMIT YES
Sorry, response 'GODDAMMIT YES' not understood. [Yes/No] YES

Autounmask changes successfully written.
Comment 1 Alexander Berntsen (RETIRED) gentoo-dev 2016-07-01 10:39:46 UTC
man emerge. Read the very first sentence of the autounmask-write documentation.
Comment 2 Mike Hodson 2016-07-01 10:46:17 UTC
Howabout you just modify the output of the command to explain config protect?

Make emerge more intuitive to use, stating "if CONFIG_PROTECT is enabled, you will need to run etc-update / dispatch-conf to merge the changes"
instead of 
"successfully written"

or

if (CONFIG_PROTECT)
  "You must finish merging config file changes with etc-update or dispatch-conf before they will take effect"
  else
  "Autounmask changes successfully written."
fi
Comment 3 Alexander Berntsen (RETIRED) gentoo-dev 2016-07-01 10:52:58 UTC
(In reply to Mike Hodson from comment #2)
> Howabout you just modify the output of the command to explain config protect?
Did you leave out something from your paste? This is output for me:

 * IMPORTANT: config file [config file name] needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

P.S.
Please don't re-open this bug because you have a new suggestion. (Feel free to make and discuss your suggestions here though.)
Comment 4 Mike Hodson 2016-07-01 11:10:18 UTC
No this is all my emerge is outputting.

Even with your verbiage, I would much rather see the exact feature name instead of overarching topic names to be used.

"
 * IMPORTANT: config file [config file name] needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.
"

Could be changed to read

" 
 * IMPORTANT: CONFIG_PROTECT enabled; config file [config file name] needs updating
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.
"

and

"Autounmask changes successfully written" 
could become
"Autounmask changes successfully written to /etc/portage/._cfg0009_package.license"

The intuitiveness is brought about by giving people memorable full strings to search for, and providing with some insight in -what- happened, to indicate to the user whether or not their internal minds eye view of what happened, is actually what happened, without needing to use strace...
Comment 5 Alexander Berntsen (RETIRED) gentoo-dev 2016-07-01 11:14:11 UTC
(In reply to Mike Hodson from comment #4)
> "
>  * IMPORTANT: config file [config file name] needs updating.
>  * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
>  * sections of the emerge man page to learn how to update config files.
> "
> 
> Could be changed to read
> 
> " 
>  * IMPORTANT: CONFIG_PROTECT enabled; config file [config file name] needs
> updating
>  * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
>  * sections of the emerge man page to learn how to update config files.
> "
I think it's too much effort to maintain a bunch of specific CONFIG_PROTECT messages. Most users seem to understand CONFIG_PROTECT.

> "Autounmask changes successfully written" 
> could become
> "Autounmask changes successfully written to
> /etc/portage/._cfg0009_package.license"
This is a simpler change, and it could be useful. Especially for system administrators who move between servers where some have CONFIG_PROTECT-ed the relevant file, and others haven't.