unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
* [bug#48165] [PATCH] nls: Do not update po files on first make invocation.
@ 2021-05-02 20:23 Julien Lepiller
  2021-05-03 13:46 ` bug#48165: " Maxim Cournoyer
  0 siblings, 1 reply; 2+ messages in thread
From: Julien Lepiller @ 2021-05-02 20:23 UTC (permalink / raw)
  To: 48165

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]

Hi Guix,

As you probably know, after the first make in a clean checkout of the
guix repository, po files are dirty and we advertise to run "git
checkout po" to get them clean again. This was caused by the gettext
generated makefile that wanted to build the mo (compiled po) files, and
these po files depend on the pot that needs to be generated.

In newer versions of gettext (at least 0.19.1 from 4 years ago), there
is an option, PO_DEPENDS_ON_POT that I set to "no", so this patch
updates the minimal gettext version to 0.19.1 and makes use of that
variable, that removes the dependency from the po files to the pot file.

This means that when make tries to generate the mo files, it can do so
immediately, without needing to generate the pot file nor update the po
files that depended on the pot.

As this patch updates the minimal requirement for gettext to 0.19.1,
I'm not sure what's the impact. This is a version from 4 years ago
(0.18.1 was from 6 years ago). We currently have gettext 0.20.1, and
debian jessie has 0.19.3, so I don't think this change will negatively
affect our users:

- developpers should already use guix environment guix which provides a
  good version.
- packagers of guix on other distros might have a harder time, but even
  debian seems to have a recent enough version

WDYT?

[-- Attachment #2: 0001-nls-Do-not-update-po-files-on-first-make-invocation.patch --]
[-- Type: text/x-patch, Size: 2170 bytes --]

From cc0549322000a319ecdb82b6cbcfd209a134e507 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sun, 2 May 2021 22:12:16 +0200
Subject: [PATCH] nls: Do not update po files on first make invocation.

We need to update the minimal gettext version to take advantage of new
features.  Before this patch, the first make invocation would modify
po/guix and po/packages po files, and we advised to run `git checkout
po` to clean the changes.

* configure.ac (AM_GNU_GETTEXT_VERSION): Update to 0.19.1.
* po/guix/Makevars: Set PO_DEPENDS_ON_POT to no.
* po/packages/Makevars: Set PO_DEPENDS_ON_POT to no.
---
 configure.ac         | 2 +-
 po/guix/Makevars     | 5 +++++
 po/packages/Makevars | 5 +++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index e5d339f6ec..c64993f4a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ dnl For the C++ code.  This must be used early.
 AC_USE_SYSTEM_EXTENSIONS
 
 AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION([0.18.1])
+AM_GNU_GETTEXT_VERSION([0.19.1])
 
 GUIX_SYSTEM_TYPE
 GUIX_ASSERT_SUPPORTED_SYSTEM
diff --git a/po/guix/Makevars b/po/guix/Makevars
index 363bf98dfd..88a4e8c7bc 100644
--- a/po/guix/Makevars
+++ b/po/guix/Makevars
@@ -26,3 +26,8 @@ EXTRA_LOCALE_CATEGORIES =
 # "make distcheck -j4".
 # See <https://lists.gnu.org/archive/html/bug-gettext/2014-08/msg00005.html>.
 DIST_DEPENDS_ON_UPDATE_PO = no
+
+# Ignore the timestamp of the .pot file, as .po files are updated by
+# `make download-po` only. This ensures po files are not modified on the
+# first `make` invocation.
+PO_DEPENDS_ON_POT = no
diff --git a/po/packages/Makevars b/po/packages/Makevars
index 39366fbee9..4cdb98d8fe 100644
--- a/po/packages/Makevars
+++ b/po/packages/Makevars
@@ -22,3 +22,8 @@ EXTRA_LOCALE_CATEGORIES =
 # "make distcheck -j4".
 # See <https://lists.gnu.org/archive/html/bug-gettext/2014-08/msg00005.html>.
 DIST_DEPENDS_ON_UPDATE_PO = no
+
+# Ignore the timestamp of the .pot file, as .po files are updated by
+# `make download-po` only. This ensures po files are not modified on the
+# first `make` invocation.
+PO_DEPENDS_ON_POT = no
-- 
2.31.1


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

* bug#48165: [PATCH] nls: Do not update po files on first make invocation.
  2021-05-02 20:23 [bug#48165] [PATCH] nls: Do not update po files on first make invocation Julien Lepiller
@ 2021-05-03 13:46 ` Maxim Cournoyer
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Cournoyer @ 2021-05-03 13:46 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 48165-done

Hi Julien!

Julien Lepiller <julien@lepiller.eu> writes:

> Hi Guix,
>
> As you probably know, after the first make in a clean checkout of the
> guix repository, po files are dirty and we advertise to run "git
> checkout po" to get them clean again. This was caused by the gettext
> generated makefile that wanted to build the mo (compiled po) files, and
> these po files depend on the pot that needs to be generated.
>
> In newer versions of gettext (at least 0.19.1 from 4 years ago), there
> is an option, PO_DEPENDS_ON_POT that I set to "no", so this patch
> updates the minimal gettext version to 0.19.1 and makes use of that
> variable, that removes the dependency from the po files to the pot file.
>
> This means that when make tries to generate the mo files, it can do so
> immediately, without needing to generate the pot file nor update the po
> files that depended on the pot.
>
> As this patch updates the minimal requirement for gettext to 0.19.1,
> I'm not sure what's the impact. This is a version from 4 years ago
> (0.18.1 was from 6 years ago). We currently have gettext 0.20.1, and
> debian jessie has 0.19.3, so I don't think this change will negatively
> affect our users:
>
> - developpers should already use guix environment guix which provides a
>   good version.
> - packagers of guix on other distros might have a harder time, but even
>   debian seems to have a recent enough version
>
> WDYT?

It seems even RHEL 8 is using 0.19; I don't think it'll cause a problem.

Thank you for this nice improvement!  I've merged it to the
version-1.3.0 branch.

Closing.

Maxim




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

end of thread, other threads:[~2021-05-03 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-02 20:23 [bug#48165] [PATCH] nls: Do not update po files on first make invocation Julien Lepiller
2021-05-03 13:46 ` bug#48165: " Maxim Cournoyer

unofficial mirror of guix-patches@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-patches/1 guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ https://yhetil.org/guix-patches \
		guix-patches@gnu.org
	public-inbox-index guix-patches

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.patches


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git