summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsupport/scripts/apply-patches.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
index 85f51b7d14..694302d33e 100755
--- a/support/scripts/apply-patches.sh
+++ b/support/scripts/apply-patches.sh
@@ -103,6 +103,14 @@ function apply_patch {
echo "Error: missing patch file ${path}/$patch"
exit 1
fi
+ existing="$(grep -E "/${patch}\$" ${builddir}/.applied_patches_list)"
+ if [ -n "${existing}" ]; then
+ echo "Error: duplicate filename '${patch}'"
+ echo "Conflicting files are:"
+ echo " already applied: ${existing}"
+ echo " to be applied : ${path}/${patch}"
+ exit 1
+ fi
echo "${path}/${patch}" >> ${builddir}/.applied_patches_list
${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N $silent
if [ $? != 0 ] ; then
OpenPOWER on IntegriCloud