path: root/meta/classes
diff options
authorRichard Purdie <>2013-09-25 12:36:46 +0000
committerRichard Purdie <>2013-09-26 16:37:13 +0100
commitf91226553e39439bfd17ab2b06c56cb8bf41061b (patch)
tree515a925ad1472d69f4a85a1aeb1c974b34be149e /meta/classes
parent6fd19a9df0ad25b2822f12e2c3a97f1b71068d4e (diff)
package.bbclass: Clear umask when using os.mkdir
We switched to using os.mkdir with the file creation mode specified as the second parameter. Python masks this with umask behind the scenes which isn't what we want, we really want the permissions we specify. To avoid this we zero the umask beforehand and restore afterwards. Other solutions are possible but would not perform as well which is why we're using os.mkdir in the first place. Martin Jansa deserves the credit for debugging where the problem was. Signed-off-by: Richard Purdie <> Signed-off-by: Saul Wold <> Signed-off-by: Richard Purdie <>
Diffstat (limited to 'meta/classes')
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index fbb68391b9..c98c6ec4eb 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -953,6 +953,9 @@ python populate_packages () {
seen = []
+ # os.mkdir masks the permissions with umask so we have to unset it first
+ oldumask = os.umask(0)
for pkg in package_list:
root = os.path.join(pkgdest, pkg)
@@ -1025,6 +1028,7 @@ python populate_packages () {
if ret is False or ret == 0:
raise"File population failed")
+ os.umask(oldumask)
unshipped = []