Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 229223 - linux-info.eclass gives spurious error messages
Summary: linux-info.eclass gives spurious error messages
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Kernel Miscellaneous
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-24 15:58 UTC by Tanktalus
Modified: 2008-12-03 18:15 UTC (History)
0 users

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


Attachments
patch (linux-info.patch,1.03 KB, patch)
2008-10-31 21:51 UTC, Daniel Drake (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tanktalus 2008-06-24 15:58:55 UTC
I get 7 of the following lines during an "emerge -vaDN world":

/usr/portage//eclass/linux-info.eclass: line 128: cd: /root: Permission denied

I think it's a combination of ~root (where I usually am when running emerge --sync or emerge --metadata) being 0700 and having userpriv, userfetch, and usersandbox enabled as FEATURES in make.conf.  When linux-info.eclass tries to cd "${workingdir}", it fails because we started in a directory that we no longer have permission to execute due to the dropped privileges.

I would suggest either the "quick fix": redirect stderr to /dev/null for this line, or the, IMO, "right fix": when dropping privileges immediately cd to a directory we can use as a working directory, such as /tmp or /var/tmp.

(Oddly, I only get this on one machine running x86.  The other two x86 boxes and the amd64 box don't have this problem.  Mind you, the ones that work all nfs mount /usr/portage off the one that does work... not sure if that's relevant.)

Reproducible: Always

Steps to Reproduce:
1. emerge -vaDN world
Actual Results:  
Calculating world dependencies -/usr/portage//eclass/linux-info.eclass: line 128: cd: /root: Permission denied
/usr/portage//eclass/linux-info.eclass: line 128: cd: /root: Permission denied
/usr/portage//eclass/linux-info.eclass: line 128: cd: /root: Permission denied
/usr/portage//eclass/linux-info.eclass: line 128: cd: /root: Permission denied
/usr/portage//eclass/linux-info.eclass: line 128: cd: /root: Permission denied
/usr/portage//eclass/linux-info.eclass: line 128: cd: /root: Permission denied
/usr/portage//eclass/linux-info.eclass: line 128: cd: /root: Permission denied
... done!

Expected Results:  
Calculating world dependencies... done!
Comment 1 Daniel Drake (RETIRED) gentoo-dev 2008-10-31 21:51:52 UTC
Created attachment 170427 [details, diff]
patch

Please try this patch, which gets rid of the changing of directories
Comment 2 Tanktalus 2008-12-03 17:44:26 UTC
This patch works here.  I look forward to it making it into the tree :-)
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2008-12-03 18:11:53 UTC
thanks, committed