[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] maint: sort THANKS using our own gear
From: |
Pádraig Brady |
Subject: |
Re: [PATCH] maint: sort THANKS using our own gear |
Date: |
Wed, 11 Feb 2015 13:42:32 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 11/02/15 08:11, Bernhard Voelker wrote:
> At least 'sort' on openSUSE/Fedora have a bug in the case-folding code
> of their I18N downstream patch which leads to wrong sort results,
> e.g. "Dániel" coming after "Dylan".
>
> * Makefile.am (THANKS): Sort the final contributor list using our
> own sort implementation - as others may result in a different order.
> ---
> Makefile.am | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index cf0c8a0..2b07ad5 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -158,7 +158,7 @@ ASSORT = LC_ALL=C sort
> # Extract all lines up to the first one starting with "##".
> prologue = perl -ne '/^\#\#/ and exit; print' $(srcdir)/THANKS.in
>
> -THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version
> +THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version $(srcdir)/src/sort
Right we need to build sort for `make dist`.
That would be best avoided TBH, though given we already compile
most of lib/ in make dist it's not too bad.
We should add a comment to remove when common platforms
have a functional sort -f.
> $(AM_V_GEN)rm -f $@-t $@; \
> { \
> $(prologue); echo; \
> @@ -167,7 +167,7 @@ THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version
> git log --pretty=format:'%aN%x00%aE' \
> | $(ASSORT) -u; \
> } | $(srcdir)/thanks-gen \
> - | LC_ALL=en_US.UTF-8 sort -f; \
> + | LC_ALL=en_US.UTF-8 $(srcdir)/src/sort -f -k1,1; \
> echo; \
> printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \
> } > $@-t && chmod a-w $@-t && mv $@-t $@
I'm wondering about the -k1,1 part.
Shouldn't we remove it so it sorts the surnames for same first names?
Same for syntax check.
cheers,
Pádraig.