mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-20 16:27:52 +00:00
packaging: Use patch
for applying patches
`tools/packaging/scripts/apply_patches.sh` uses `git apply $patch`, but this will not apply to subdirectories. If one wanted to apply with `git apply`, they'd have to run it with `--directory=...` _relative to the Git tree's root_ (absolute will not work!). I suggest we just use `patch`, which will do what we expected `git apply` would do. `patch` is also added to build containers that require it. Fixes: #3690 Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
This commit is contained in:
@@ -40,7 +40,7 @@ if [ -d "$patches_dir" ]; then
|
||||
echo "INFO: Found ${#patches[@]} patches"
|
||||
for patch in ${patches[@]}; do
|
||||
echo "INFO: Apply $patch"
|
||||
git apply "$patch" || \
|
||||
patch -p1 < "$patch" || \
|
||||
{ echo >&2 "ERROR: Not applied. Exiting..."; exit 1; }
|
||||
done
|
||||
else
|
||||
|
Reference in New Issue
Block a user