Skip to content

utils.py: default mode on mkdirhier

Peter Seebach bitbake-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1utils.py: default mode for mkdirhierlib/bb/utils.py+2 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] utils.py: default mode on mkdirhier

It turns out that bb.utils.mkdirhier() is occasionally called with widely varying umasks, including but not limited to 022, 002, or 0. This can result in unpredictable directory permissions, depending on which context you were in when a directory got made, and it can also result in mode 777 directories, which are Probably Bad. (The most obvious case involves packages-split being created by accident with umask 0 in populate_packages, shortly before a later attempt to create it with umask 022.)

I've done test builds with this modification, and nothing seemed to go wrong. I used an optional argument, rather than just hard-coding the 0755, because if I use an optional argument it will always be right, but if I don't I'm sure it will turn out to break something.

The following changes since commit d150226d11d5f041f78c8c3ce4abc5465dbc81d8:

fetch2/perforce: Ensure command has a default (2014-05-11 15:25:47 +0100)

are available in the git repository at:
git://git.yoctoproject.org/poky-contrib seebs/mkdirhier
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/mkdirhier

Peter Seebach (1):
utils.py: default mode for mkdirhier

 lib/bb/utils.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)