[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] maint: fix invalid patch in recent commit
From: |
Pádraig Brady |
Subject: |
[PATCH] maint: fix invalid patch in recent commit |
Date: |
Tue, 3 Feb 2015 04:36:23 +0000 |
* gl/lib/tempname.c.diff: Adjust so it applies again.
* 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.
Invalid patch noticed at http://hydra.nixos.org/eval/1172233
---
cfg.mk | 18 ++++++++++++++----
gl/lib/tempname.c.diff | 2 +-
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 21a00d3..e2965c8 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -122,6 +122,12 @@ sc_tests_executable:
| sed -e "s/^/$(ME): Please make test executable: /" | grep . \
&& exit 1; :
+# Ensure all gnulib patches apply
+sc_ensure_gl_diffs_apply:
+ @find gl/ -name '*.diff' | while read p; do \
+ patch -s -d gnulib -p1 --dry-run < "$$p" || { echo $p; exit 1; } \
+ done
+
# Avoid :>file which doesn't propagate errors
sc_prohibit_colon_redirection:
@cd $(srcdir)/tests && GIT_PAGER= git grep -n ': *>.*||' \
@@ -364,15 +370,15 @@ sc_prohibit_uppercase_id_est:
$(_sc_search_regexp)
# Enforce double-space before "I.e." at the beginning of a sentence.
-sc_ensure_double_space_after_dot_before_id_est:
- @prohibit='\. I\.e\.' \
+sc_ensure_dblspace_after_dot_before_id_est:
+ @prohibit='\. I\.e\.' \
halt='Single space after dot before "i.e."; use ". i.e." instead' \
$(_sc_search_regexp)
# Enforce comma after "i.e." (at least before a blank or at EOL).
sc_ensure_comma_after_id_est:
- @prohibit='[Ii]\.e\.( |$$)' \
- halt='Missing comma after "i.e."; use "i.e.," instead' \
+ @prohibit='[Ii]\.e\.( |$$)' \
+ halt='Missing comma after "i.e."; use "i.e.," instead' \
$(_sc_search_regexp)
# The SEE ALSO section of a man page should not be terminated with
@@ -691,6 +697,10 @@ exclude_file_name_regexp--sc_prohibit_atoi_atof =
^src/make-prime-list\.c$$
# Exception here as we don't want __attribute elided on non GCC
exclude_file_name_regexp--sc_prohibit-gl-attributes = ^src/libstdbuf\.c$$
+exclude_file_name_regexp--sc_prohibit_uppercase_id_est = \.diff$
+exclude_file_name_regexp--sc_ensure_dblspace_after_dot_before_id_est = \.diff$$
+exclude_file_name_regexp--sc_ensure_comma_after_id_est = \.diff$
+
# Augment AM_CFLAGS to include our per-directory options:
AM_CFLAGS += $($(@D)_CFLAGS)
diff --git a/gl/lib/tempname.c.diff b/gl/lib/tempname.c.diff
index 7cf9230..7de6109 100644
--- a/gl/lib/tempname.c.diff
+++ b/gl/lib/tempname.c.diff
@@ -33,7 +33,7 @@ index 26a38ce..5944ee0 100644
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
/* Generate a temporary file name based on TMPL. TMPL must match the
-- rules for mk[s]temp (i.e., end in "XXXXXX", possibly with a suffix).
+- rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix).
+ rules for mk[s]temp (i.e., end in at least X_SUFFIX_LEN "X"s,
+ possibly with a suffix).
The name constructed does not exist at the time of the call to
--
2.1.0
- [PATCH] maint: fix invalid patch in recent commit,
Pádraig Brady <=