[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] maint: fix invalid patch in recent commit
From: |
Bernhard Voelker |
Subject: |
Re: [PATCH] maint: fix invalid patch in recent commit |
Date: |
Tue, 03 Feb 2015 08:35:52 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 02/03/2015 06:12 AM, Pádraig Brady wrote:
> From 5914a5ca4f49d62d6cfa4c4ba772aea01851b53f Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?P=C3=A1draig=20Brady?= <address@hidden>
> Date: Tue, 3 Feb 2015 03:15:10 +0000
> Subject: [PATCH] build: fix invalid gnulib patch
>
> * gl/lib/tempname.c.diff: Fix recent breakage so it applies again.
> Invalid patch was noticed at http://hydra.nixos.org/eval/1172233
oh, these are nasty error messages. Sorry.
> * cfg.mk: Exempt diff files from these "id_est" syntax checks.
> (sc_ensure_gl_diffs_apply): A new syntax check, to ensure all
> patches under gl/ apply cleanly. Note we use --fuzz=0 to check
> patches apply cleanly for safety, due to the patch(1) issue detailed
> in commit v8.21-117-g46f7e05
> * gl/lib/regcomp.c.diff: Rediffed.
> * gl/lib/regex_internal.c.diff: Likewise.
> * gl/lib/regex_internal.h.diff: Likewise.
> * gl/lib/regexec.c.diff: Likewise.
> * gl/lib/tempname.h.diff: Likewise.
> diff --git a/cfg.mk b/cfg.mk
> index 21a00d3..e16125f 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -122,6 +122,14 @@ sc_tests_executable:
> | sed -e "s/^/$(ME): Please make test executable: /" | grep . \
> && exit 1; :
>
> +# Ensure all gnulib patches apply cleanly
> +sc_ensure_gl_diffs_apply_cleanly:
> + @find gl/ -name '*.diff' | while read p; do \
> + patch --fuzz=0 -s -d gnulib/ -p1 --dry-run < "$$p" \
> + || { echo "$$p" ; echo 'To refresh run:' \
> + 'make refresh-gnulib-patches'; exit 1; } \
> + done
> +
Good idea, thanks.
Minor issue: depending on the state of the gnulib directory,
the syntax-check may ask questions and probably hang:
ensure_gl_diffs_apply_cleanly
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
8 out of 8 hunks ignored
gl/lib/tempname.c.diff
To refresh run: make refresh-gnulib-patches
cfg.mk:127: recipe for target 'sc_ensure_gl_diffs_apply_cleanly' failed
make: *** [sc_ensure_gl_diffs_apply_cleanly] Error 1
OTOH, as this is the bad case anyway, having patch asking may not be
much of a problem.
Otherwise +1, thanks again.
Have a nice day,
Berny