Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 662700 - env-update does not fail gracefully when run as a non-root user
Summary: env-update does not fail gracefully when run as a non-root user
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-03 08:28 UTC by Drew W
Modified: 2018-08-03 15:38 UTC (History)
0 users

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


Attachments
env-update error output (env-update-non-root-err.txt,1.17 KB, text/plain)
2018-08-03 08:28 UTC, Drew W
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Drew W 2018-08-03 08:28:13 UTC
Created attachment 542218 [details]
env-update error output

This is an extremely minor issue, and frankly I'm probably being nit-picky about this, but env-update should politely remind the user that it needs to be run as root. Currently, running it as a non-root user spits out the attached log.

(Yes, I actually ran it as a non-root user, completely forgetting that it needs to be run as root, hence my noticing this.)
Comment 1 Zac Medico gentoo-dev 2018-08-03 15:38:15 UTC
We also support unprivileged modes, so we Could do something like this to check if the relevant EROOT is writable:

   os.access(first_existing(EROOT), os.W_OK))