Its really a bug? The permissions on /var/cache/edb/virtuals are: (only tested on stage3 for amd-athlon and pentium III, and maybe an autogenerated by portage) -rw-r----- 1 root root 1251 May 9 19:24 virtuals It must be IMHO: -rw-r----- 1 root portage 1251 May 9 19:24 virtuals The problem: I use xorg-x11 instead of xfree. When i do an `emerge -pv <anything that depends on virtual/x11>` as an user (in portage group) it shows that portage will emerge xfree-4... why? because it can not read the virtuals file. Example: user$ emerge -pv gvim These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild N ] x11-base/xfree-4.3.0-r5 -3dfx -3dnow -bindist -cjk -debug -doc +ipv6 +mmx +nls +pam -sdk +sse -static +truetype +xml2 65,682 kB [ebuild R ] app-editors/gvim-6.2-r9 -acl -cscope -gnome +gpm +gtk +gtk2 +motif +ncurses +nls +perl +python -ruby -(selinux) 0 kB root# emerge -pv gvim These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] app-editors/gvim-6.2-r9 -acl -cscope -gnome +gpm +gtk +gtk2 +motif +ncurses +nls +perl +python -ruby -(selinux) 0 kB If I do an `chown root:portage var/cache/edb/virtuals` everything is ok: user$ emerge -pv gvim These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] app-editors/gvim-6.2-r9 -acl -cscope -gnome +gpm +gtk +gtk2 +motif +ncurses +nls +perl +python -ruby -(selinux) 0 kB It must append with another package that depends on a virtual package pretending to emerge like a user.
This is apparently not changed by portage, as I still have the original permissions: -rw-r--r-- 1 root root 1376 May 6 19:26 /var/cache/edb/virtuals However, the new (and IMHO incorrect) permissions are present in at least stage 1 of the 2004.1 release, so we can probably assume that it's a general problem with that release. It's fine in 2004.0, BTW.
Shouldn't it be "rw" for "portage" group, too?
I'd say that it should not be writable by members of the portage group. Editing that file could perhaps upset a few things in the system, so only root should be allowed to change it. Besides, as far as I know that file is only updated by a new merge, which root will be doing anyway.
The file is no longer used in portage-2.0.51. Any user-changes will go in /etc/portage/virtuals and permissions can be set by admin.
I'm using portage 2.0.50-r11. I think that the group should be "portage" instead of root for everything under /var/cache/edb. The current permissions look fine to me. The reason I think the group should be changed is so certain portage commands give the same results both to users in the portage group and to root. For example, I have a system which is built on linux26-headers. If I do: emerge -uDvp world as root on an up to date system, I get an empty list. If I do this as a normal user in the portage group, however, then I get the following: [ebuild N ] sys-kernel/linux-headers-2.4.21-r1 -build 27,864 kB I think this is because the user can't read the virtuals file, and maybe a few other files, so portage falls back to some defaults, and I end up thinking i need to downgrade something. Of course, I still have to be root to build and install, and the update list will be correct when I actually do the update, so it's not that serious. It is, however, confusing, and it's such an easy fix.