Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 470000 - app-portage/ufed-0.90_rc2: Read-only interface if make.conf not writable
Summary: app-portage/ufed-0.90_rc2: Read-only interface if make.conf not writable
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sven Eden
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-15 20:50 UTC by Roman Žilka
Modified: 2014-03-21 15:25 UTC (History)
1 user (show)

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 Roman Žilka 2013-05-15 20:50:01 UTC
When starting ufed should check if it has write access to make.conf. In the negative case the whole UI should be read-only, i.e., no changes to flag settings possible and Save&Exit unavailable.

Rationale: it could easily happen that one starts ufed as non-root, spends a hefty amount of time tuning the USE flags, only to find the changes lost after Save&Exit.

The read-only status could be somehow stressed in the UI itself. Like a bold red "read-only (make.conf not writable)" somewhere.

By the way, this is only marginally important, but when I actually try to do that (run as non-root, make changes, save&exit), I get this error: "Couldn't open /etc/portage/make.conf.old". Which looks like ufed tries to open the backup file and if it doesn't succeed at that, it stops, while it may yet be able to write the actual changes to make.conf, make the backup in /tmp under a random name and notify the user. It's almost impossible that anyone will ever need this, but in case you've got enough time on your hands...

Reproducible: Always
Comment 1 Sven Eden 2013-07-22 06:23:39 UTC
I'll put it on my list as I think this simple additional check is, although the situation might be rare, helpful.

Note: Please assign this bug to me. Thanks!
Comment 2 Sven Eden 2013-09-10 06:38:35 UTC
Added the checks. The effect can be seen using the live ebuild and then starting ufed by a user that has no right to change /etc/portage/make.conf (or whatever file ufed found out to hold the USE flags)

The output is something like:

> WARNING: /etc/portage/make.conf not writable by uid/gid 1000/1005
> WARNING: ufed will run in read-only-mode!

And as this is only shown briefly, the two title lines of the interface are shown in a different color set then reading:

> READ ONLY Gentoo USE flags editor git READ ONLY
> READ ONLY USE flags can be browsed, but changes will NOT be saved! READ ONLY

Further more the short help text at the bottom then reads:

> Enter: Exit Esc: Exit

Pressing either key then prompts "Exit? (Y/N)" instead of Save/Cancel.
Comment 3 Sven Eden 2014-03-21 15:25:47 UTC
This bug is fixed with the new version 0.91 in the tree.