stages/mkdir: explicitly set mode using os.chmod

Documentation for os.mkdir() says that the mode is
ignored on some systems. Also umask value may affect
the final mode. So we set the mode explicitly.

Set the mode explicitly.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2023-01-16 11:50:09 +01:00 committed by Simon de Vlieger
parent a0f4cff361
commit a988aacf99

View file

@ -62,6 +62,11 @@ def main(tree, options):
else:
os.mkdir(target, mode)
# Documentation for os.mkdir() says that the mode is
# ignored on some systems. Also umask value may affect
# the final mode. So we set the mode explicitly.
os.chmod(target, mode, follow_symlinks=False)
return 0