intel_sync_upstream: Fix unreadable files before git add
Add fix_permissions() function to resolve files with 000 permissions
(unreadable files) that prevent git add from working.
In edk2/edk2-platforms repos, submodules are sometimes handled as regular
files and appear with 000 permissions after patching. This causes git add
to fail with permission denied errors.
The function:
- Identifies and lists unreadable files (000 permissions) before fixing them
- Changes permissions from 000 to 664 (rw-rw-r--) to allow git operations
- Only applies to non-FSP directories where this issue occurs
- Called specifically before git add to ensure staging works properly
This prevents git add failures during the upstream sync process for
edk2 and edk2-platforms repositories.
Change-Id: I2aa37a94d0019cd4f5a61fe053bb21c4172bcfd3
Signed-off-by: Manigandan, Balaji <balaji.manigandan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/6998889
Reviewed-by: Kapil Porwal <kapilporwal@chromium.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
1 file changed