unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: 01/01: gnu: evolution-data-server: Fix locale handling.
       [not found] ` <20190716133816.6B83420BE2@vcs0.savannah.gnu.org>
@ 2019-07-17 18:34   ` Mark H Weaver
  2019-07-19 17:12     ` Timothy Sample
  0 siblings, 1 reply; 2+ messages in thread
From: Mark H Weaver @ 2019-07-17 18:34 UTC (permalink / raw)
  To: Timothy Sample; +Cc: guix-devel

Hi Timothy,

guix-commits@gnu.org writes:

> samplet pushed a commit to branch core-updates
> in repository guix.
>
> commit d619686250d8bb15bf67031f8ac80f9cfb400a26
> Author: Timothy Sample <samplet@ngyro.com>
> Date:   Sun Jul 14 23:47:44 2019 -0400
>
>     gnu: evolution-data-server: Fix locale handling.
>     
>     * gnu/packages/gnome.scm (evolution-data-server)[arguments]: Add a phase
>     that patches the source code to fix a locale handling issue.
> ---
>  gnu/packages/gnome.scm | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index ae5b85d..f42b506 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -5211,6 +5211,22 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.")
>                             "tests/libedata-cal/test-cal-cache-utils.c")
>                (("/bin/rm") (which "rm")))
>              #t))
> +         ;; This phase fixes locale canonicalization when using newer
> +         ;; versions of ICU.  The bug has been fixed upstream, and
> +         ;; should appear starting in version 3.33.5.
> +         ;; <https://gitlab.gnome.org/GNOME/evolution-data-server/issues/137>.
> +         (add-after 'unpack 'patch-locale-canonicalization
> +           (lambda _
> +             (substitute* "src/libedataserver/e-collator.c"
> +               (("len = uloc_canonicalize \\(posix_locale,.*" x)
> +                ((lambda (xs) (string-join xs "\n" 'suffix))
> +                 (list
> +                  "if (posix_locale && ("
> +                  "    g_ascii_strcasecmp(posix_locale, \"C\") == 0 ||"
> +                  "    g_ascii_strcasecmp(posix_locale, \"POSIX\") == 0))"
> +                  "  posix_locale = \"en_US_POSIX\";"
> +                  x))))
> +             #t))
>           (add-before 'configure 'dont-override-rpath
>             (lambda _
>               (substitute* "CMakeLists.txt"

IMO, we should use patches for things like this.  Most importantly, the
'substitute*' may silently do the wrong thing, or perhaps do nothing at
all, when the relevant code changes.  The 'patch' program is far more
robust in such scenarios.  Also, it would be good for fixes like this to
be included in the result of "guix build --source".

What do you think?

Anyway, thanks for working on it.

    Regards,
      Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 01/01: gnu: evolution-data-server: Fix locale handling.
  2019-07-17 18:34   ` 01/01: gnu: evolution-data-server: Fix locale handling Mark H Weaver
@ 2019-07-19 17:12     ` Timothy Sample
  0 siblings, 0 replies; 2+ messages in thread
From: Timothy Sample @ 2019-07-19 17:12 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Hi Mark,

Mark H Weaver <mhw@netris.org> writes:

> Hi Timothy,
>
> guix-commits@gnu.org writes:
>
>> samplet pushed a commit to branch core-updates
>> in repository guix.
>>
>> commit d619686250d8bb15bf67031f8ac80f9cfb400a26
>> Author: Timothy Sample <samplet@ngyro.com>
>> Date:   Sun Jul 14 23:47:44 2019 -0400
>>
>>     gnu: evolution-data-server: Fix locale handling.
>>     
>>     * gnu/packages/gnome.scm (evolution-data-server)[arguments]: Add a phase
>>     that patches the source code to fix a locale handling issue.
>>
>> [...]
>
> IMO, we should use patches for things like this.  Most importantly, the
> 'substitute*' may silently do the wrong thing, or perhaps do nothing at
> all, when the relevant code changes.  The 'patch' program is far more
> robust in such scenarios.  Also, it would be good for fixes like this to
> be included in the result of "guix build --source".
>
> What do you think?

I agree completely.  I was mostly put off by how cumbersome the patch
system is for such a little change.  In this case, I’m pretty sure none
of the problems you’ve mentioned will happen, but that’s not a great
excuse.  This kind of feature-level change is exactly what the patch
system is for.

I’ve fixed my mistake in e1f174ae284d9954840f1723ac012c0d3fbcecb4.

> Anyway, thanks for working on it.

Thanks for the quality control!


-- Tim

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-19 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190716133815.30223.13059@vcs0.savannah.gnu.org>
     [not found] ` <20190716133816.6B83420BE2@vcs0.savannah.gnu.org>
2019-07-17 18:34   ` 01/01: gnu: evolution-data-server: Fix locale handling Mark H Weaver
2019-07-19 17:12     ` Timothy Sample

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).