Gentoo Archives: gentoo-portage-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] making permission/ownership retention consistent
Date: Wed, 05 Jul 2006 06:21:39
Message-Id: 200607050220.44838.vapier@gentoo.org
1 when merging things from ${D} to ${ROOT}, portage currently will make sure
2 that the permissions in ${D} for files are retained after merging into
3 ${ROOT}, but not for directories
4
5 for example, consider an ebuild that:
6 - creates dir /usr/share/foo with foo:foo ownership and 777 permissions
7 - creates file /usr/share/foo/bar with foo:foo ownership and 777 permissions
8
9 now the user goes in and runs:
10 chmod -R 700 /usr/share/foo
11 chown -R 0:0 /usr/share/foo
12
13 then the user goes and re-emerges the aforementioned ebuild ... then end
14 result ? the directory /usr/share/foo will still be 0:0 ownership with 700
15 permissions yet the file /usr/share/foo/bar will be reset to foo:foo
16 ownership and 777 permissions
17
18 personally i think that we should be retaining the permissions of the file as
19 is instead of resetting it, but i wont fight too hard in either direction ...
20 we just need the behavior to be consistent
21 -mike

Replies