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

Bug 106061

Summary: env-update needs better error message when user isn't root
Product: Gentoo Linux Reporter: Rune Schjellerup <olberd>
Component: [OLD] Core systemAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: f5d8fd51ed1e804c9e8d0357e8614e0493b06e96, phajdan.jr
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 162453    
Attachments: env-update.patch

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.