packaging: qemu/apply_patches.sh should sort the patches

Changed apply_patches.sh script so that patches are sorted before
they be applied.

Fixes #1014

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This commit is contained in:
Wainer dos Santos Moschetta 2020-10-21 15:10:22 -04:00
parent 8c3228c286
commit d4cf3057a9

View File

@ -18,7 +18,7 @@ patches_dir="${script_dir}/patches/${stable_branch}"
echo "Handle patches for QEMU $qemu_version (stable ${stable_branch})"
if [ -d $patches_dir ]; then
for patch in $(find $patches_dir -name '*.patch'); do
for patch in $(find $patches_dir -name '*.patch'|sort -t- -k1,1n); do
echo "Apply $patch"
git apply "$patch"
done