Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 274389 - Combining ROOT= with PKGDIR= causes "Permission denied: '/usr/portage/packages'"
Summary: Combining ROOT= with PKGDIR= causes "Permission denied: '/usr/portage/packages'"
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-16 17:50 UTC by Eitan Mosenkis
Modified: 2009-06-16 18:01 UTC (History)
0 users

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 Eitan Mosenkis 2009-06-16 17:50:44 UTC
I don't know why /usr/portage/packages is root:root with no read permission instead of portage:portage with group readable in the first place - so maybe that should be changed also, but there seems to be another bug that's revealed since portage group can't read /usr/portage/packages.
See steps to reproduce for clearer description.

Reproducible: Always

Steps to Reproduce:
Run as a non-root user in the portage group (ensure that you have at least one binpkg available so /usr/portage/packages exists):
1. PKGDIR=. emerge -pK gcc
2. ROOT=. PKGDIR=. emerge -pK gcc
Actual Results:  
Without ROOT=., it fails (as it should):
there are no ebuilds to satisfy "sys-devel/gcc".
With ROOT=. it fails:
Calculating dependencies -Permission denied: '/usr/portage/packages'

Expected Results:  
Both results should be there are no ebuilds to satisfy "sys-devel/gcc".
There shouldn't be any (attempted) access to /usr/portage/packages since PKGDIR is set

emerge --info still reports the correct PKGDIR as expected.
If /usr/portage/packages is removed or set to be readable to the user in question, it turns out that the specified PKGDIR is still being used, as packages in PKGDIR are reported (I used less instead of gcc because I was missing binary versions of deps for gcc):
Calculating dependencies... done!
[binary  N    ] sys-libs/gpm-1.20.5 to /home/eitan/soc/git/ USE="(-selinux)" 
[binary  N    ] sys-libs/ncurses-5.6-r2 to /home/eitan/soc/git/ USE="gpm unicode -debug -doc -minimal -nocxx -profile -trace" 
[binary  N    ] sys-apps/less-418 to /home/eitan/soc/git/ USE="unicode"
Comment 1 Eitan Mosenkis 2009-06-16 18:01:40 UTC
# emerge -V
Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.29-tuxonice-r3 x86_64)