From e83d3a862b8d78cbec2469e4b7ced7a08ac2885b Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Mon, 18 Dec 2006 10:28:14 +0000 Subject: Output a warning if the patch failed to apply but it's not required. svn path=/trunk/; revision=13 --- autoepatch.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/autoepatch.sh b/autoepatch.sh index b4f623f..9efcc9e 100755 --- a/autoepatch.sh +++ b/autoepatch.sh @@ -59,18 +59,23 @@ main() { done # Check if the patchset requires us to fail if the - # patch is not applied, if there's no patch_required - # function, just skip over - type patch_required &>/dev/null || continue + # patch is not applied. By default, don't. + if ! type patch_required &>/dev/null; then + patch_required() { return 1; } + fi if ! type patch_failed_msg &>/dev/null; then - patch_failed_msg() { + patch_failed_msg() { eerror "Failed patch ${patchset##*/}" } fi if [[ -z ${PATCH_APPLIED} ]]; then - patch_required && patch_failed_msg && exit 2 + if patch_required; then + patch_failed_msg && exit 2 + else + ewarn " failed, but patch not required, ignoring." + fi fi done <<<"${targets}" -- cgit v1.2.3-65-gdbad