[OE-core] Directory permissions and ownership -- RFC

Phil Blundell pb at pbcl.net
Tue Jun 21 21:52:34 UTC 2011


On Tue, 2011-06-21 at 16:41 -0500, Mark Hatle wrote:
> Unfortunately it won't work as the umask would only be set in the "mytask" -
> task.  It needs to be set in all of the do_install and do_package tasks.
> 
> The only way to do this (from what Chris L told me) is to setup an event handler
> and set the umask when we get into specific events.  I'm not sure if I could
> correctly capture do_install and later.. plus if someone did what you are
> mentioning, then it would no longer be in the umask 022.

I think you could probably fix do_install by wrapping it in a python
method.  That is, something along the lines of:

python do_wrapped_install() {
	os.umask(022)
	bb.build.exec_func("install", d)
}
addtask wrapped_install after do_compile

and, obviously, remove the existing addtask for do_install.  You get the
idea, anyway.

For do_package and other tasks which come from classes within oe-core
itself, I continue to think that the right answer is just to fix the
classes to do the right thing.

p.





More information about the Openembedded-core mailing list