pmb.parse.bootimg: make boot.img readable for all after copying (MR 2105)

This prevents rare errors when source file didn't have the
correct permissions.
This commit is contained in:
Alexey Min 2021-09-13 14:34:18 +03:00
parent bf02c72da7
commit 374d7379ab
No known key found for this signature in database
GPG Key ID: EBF5ECFFFEE34DED
1 changed files with 2 additions and 0 deletions

View File

@ -87,7 +87,9 @@ def bootimg(args, path):
bootimg_path = f"{args.work}/chroot_native{temp_path}/boot.img"
# Copy the boot.img into the chroot temporary folder
# and make it world readable
pmb.helpers.run.root(args, ["cp", path, bootimg_path])
pmb.helpers.run.root(args, ["chmod", "a+r", bootimg_path])
file_output = pmb.chroot.user(args, ["file", "-b", "boot.img"],
working_dir=temp_path,