Add umask task control

Bitbake now allows the umask to be specified per task.  The
following tasks will have a umask of 022 set by default:

do_configure
do_compile
do_install
do_package
do_populate_sysroot
do_rootfs

do_configure and do_compile need a umask of 022 set because -many- recipes
directly copy generated files out of recipe's build directory.  Instead of
fixing each existing and future recipe, it was shown to be much easier to
just set the umask.

(From OE-Core rev: 0cfa7ebcf661aa0645c6d4d858b04946ebacb7e4)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Mark Hatle
2011-06-21 23:56:25 -05:00
committed by Richard Purdie
parent b320f558ed
commit 477f685ce0
5 changed files with 11 additions and 0 deletions

View File

@@ -262,14 +262,18 @@ python () {
# If we're building a target package we need to use fakeroot (pseudo)
# in order to capture permissions, owners, groups and special files
if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
bb.data.setVarFlag('do_configure', 'umask', 022, d)
bb.data.setVarFlag('do_compile', 'umask', 022, d)
deps = (bb.data.getVarFlag('do_install', 'depends', d) or "").split()
deps.append('virtual/fakeroot-native:do_populate_sysroot')
bb.data.setVarFlag('do_install', 'depends', " ".join(deps),d)
bb.data.setVarFlag('do_install', 'fakeroot', 1, d)
bb.data.setVarFlag('do_install', 'umask', 022, d)
deps = (bb.data.getVarFlag('do_package', 'depends', d) or "").split()
deps.append('virtual/fakeroot-native:do_populate_sysroot')
bb.data.setVarFlag('do_package', 'depends', " ".join(deps),d)
bb.data.setVarFlag('do_package', 'fakeroot', 1, d)
bb.data.setVarFlag('do_package', 'umask', 022, d)
bb.data.setVarFlag('do_package_setscene', 'fakeroot', 1, d)
source_mirror_fetch = bb.data.getVar('SOURCE_MIRROR_FETCH', d, 0)
if not source_mirror_fetch: