Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 106061 - env-update needs better error message when user isn't root
Summary: env-update needs better error message when user isn't root
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 162453
  Show dependency tree
 
Reported: 2005-09-15 06:10 UTC by Rune Schjellerup
Modified: 2007-01-29 03:23 UTC (History)
2 users (show)

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


Attachments
env-update.patch (env-update.patch,297 bytes, patch)
2005-09-15 11:38 UTC, Paweł Hajdan, Jr. (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rune Schjellerup 2005-09-15 06:10:10 UTC
When the user hasn't permission to write /etc/ld.so.conf the error message is bad

Reproducible: Always
Steps to Reproduce:
1.env-update as a normal user
2.
3.

Actual Results:  
bash-2.05b$ /usr/sbin/env-update && source /etc/profile
PORTAGE_GPG_DIR is invalid. Removing gpg from FEATURES.
Traceback (most recent call last):
  File "/usr/sbin/env-update", line 11, in ?
    portage.env_update()
  File "/usr/lib/portage/pym/portage.py", line 541, in env_update
    myfd=open(root+"etc/ld.so.conf","w")
IOError: [Errno 13] Permission denied: '/etc/ld.so.conf'


Expected Results:  
An error message like the one emerge gives:

bash-2.05b$ emerge fslkj
PORTAGE_GPG_DIR is invalid. Removing gpg from FEATURES.
emerge: root access required.
Comment 1 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2005-09-15 11:38:57 UTC
Created attachment 68525 [details, diff]
env-update.patch

This simple patch should fix the problem.
Comment 2 Zac Medico gentoo-dev 2007-01-29 03:23:17 UTC
This has been released in 2.1.2-r5.