all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Bavier <ericbavier@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Eric Bavier <ericbavier@gmail.com>, 18247@debbugs.gnu.org
Subject: bug#18247: Cyclic dependencies in (gnu package *) modules
Date: Sat, 16 Aug 2014 01:00:30 -0500	[thread overview]
Message-ID: <87lhqpdldt.fsf@gmail.com> (raw)
In-Reply-To: <87sil011ou.fsf@gnu.org>

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


Ludovic Courtès writes:

> Eric Bavier <ericbavier@gmail.com> skribis:
>
>> Ludovic Courtès writes:
>>
>>> As a stop-gap measure, I’ve worked around the problem in commit d759cf6,
>>> which removes the dependency from texinfo to gettext.
>>>
>>> (Éric: I see one test failure in texi2html, which is a priori unrelated
>>> to the change.  Could you check what’s going on?)
>>
>> The problem is that texi2html does actually require gettext.
>
> No, it really only needed it because texi2html.pl was modified by the
> patch, which triggered a rule to re-compute PO files.

After reseting the timestamp, the makefile still wants to run msgexec
for some reason. This doesn't appear to be fatal...

> I just tried with current master with #:tests? #f, and it does pass.

Yes, with #:tests? #f it builds succesfully; I did not try that.  It
appears the resulting texi2html tool is even functional::

  $ /gnu/store/...-texi2html/bin/texi2html doc/guix.texi
  $ echo $?
  0a

> Perhaps that’s an intermittent test failure?  Can you reproduce it?

The test failures are reproducible on my end.  The attached patch allows
the tests to run successfully.  Let me know if this seems like a
reasonable solution.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-texi2html-Fix-tests-in-the-absense-of-gettext.patch --]
[-- Type: text/x-diff, Size: 4258 bytes --]

From e0f0ff27fce4e5b62105ffd28281a78552c1dc39 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Sat, 16 Aug 2014 00:56:42 -0500
Subject: [PATCH] gnu: texi2html: Fix tests in the absense of gettext.

* gnu/packages/patches/texi2html-i18n.patch: New patch.
* gnu/packages/texinfo.scm (texi2html)[source]: Use it.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                             |    1 +
 gnu/packages/patches/texi2html-i18n.patch |   50 +++++++++++++++++++++++++++++
 gnu/packages/texinfo.scm                  |    3 +-
 3 files changed, 53 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/texi2html-i18n.patch

diff --git a/gnu-system.am b/gnu-system.am
index 66a1677..f29f3f6 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -378,6 +378,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/tcsh-fix-autotest.patch			\
   gnu/packages/patches/teckit-cstdio.patch			\
   gnu/packages/patches/texi2html-document-encoding.patch	\
+  gnu/packages/patches/texi2html-i18n.patch			\
   gnu/packages/patches/udev-gir-libtool.patch			\
   gnu/packages/patches/util-linux-perl.patch			\
   gnu/packages/patches/valgrind-glibc.patch			\
diff --git a/gnu/packages/patches/texi2html-i18n.patch b/gnu/packages/patches/texi2html-i18n.patch
new file mode 100644
index 0000000..eba903d
--- /dev/null
+++ b/gnu/packages/patches/texi2html-i18n.patch
@@ -0,0 +1,50 @@
+Do not try to regenerate po files; use the reference files that are packaged
+in the tarball.
+
+--- a/Makefile.in	2010-06-30 17:02:28.000000000 -0500
++++ b/Makefile.in	2014-08-16 00:22:38.447050269 -0500
+@@ -1022,15 +1022,7 @@
+ 
+ i18n/en.thl i18n/: $(po_document_dir)/po_document/$(PACKAGE)_document.pot
+ 	$(MKDIR_P) i18n
+-	if test '$(USE_NLS)' = 'yes'; then \
+-	  for file in "$(srcdir)/$(po_document_dir)/po_document/"*".po"; do lang=`basename "$$file" .po | sed 's/\..*//'`; \
+-		test "$$lang" = 'en' && continue; \
+-		msgexec -i "$$file" "$(srcdir)/gettext_to_separated.pl" | "$(srcdir)/separated_to_hash.pl" $$lang > i18n/$$lang.thl; \
+-	  done; \
+-	  msgexec -i $< "$(srcdir)/gettext_to_separated.pl" | "$(srcdir)/separated_to_hash.pl" en > i18n/en.thl; \
+-	else \
+-	  cp -p i18n_ref/*.thl i18n; \
+-	fi
++	cp -p i18n_ref/*.thl i18n
+ 
+ i18n_ref:
+ 	$(MKDIR_P) i18n_ref
+
+Have install-sh install .mo files locally for in-source tests, so that msgfmt
+is not needed.
+
+--- a/Makefile.in	2010-06-30 17:02:28.000000000 -0500
++++ b/Makefile.in	2014-08-16 00:22:38.447050269 -0500
+@@ -1052,19 +1044,8 @@
+ # update the po files, and install locally the .mo files for the in
+ # source tests
+ check-local: makeinfo.pl texi2any.pl
+-	if test '$(USE_NLS)' = 'yes'; then \
+-	  cd $(po_document_dir)/po_document && $(MAKE) $(AM_MAKEFLAGS) update-po; \
+-	fi
+-	rm -rf locales
+-	for file in "$(srcdir)/$(po_document_dir)/po_document/"*.po; do \
+-	  basename=`basename "$$file" .po` ; \
+-	  $(MKDIR_P) "locales/$$basename/LC_MESSAGES/" ; \
+-	  if test '$(USE_NLS)' = 'yes'; then \
+-	    $(MSGFMT) "$$file" -o "locales/$$basename/LC_MESSAGES/texi2html_document.mo" ; \
+-	  else \
+-	    cp -p "$(srcdir)/$(po_document_dir)/po_document/$$basename.mo" "locales/$$basename/LC_MESSAGES/texi2html_document.mo" ; \
+-	  fi; \
+-	done
++	$(MAKE) -C po_document localedir="$(abs_srcdir)/locales" install-data
++	$(MAKE) -C po_messages localedir="$(abs_srcdir)/locales" install-data
+ 
+ makeinfo.pl texi2any.pl:
+ 	-$(LN_S) $(srcdir)/texi2html.pl $@
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index c199fd6..0cce38b 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -79,7 +79,8 @@ is on expressing the content semantically, avoiding physical markup commands.")
                (base32
                 "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8"))
               (patches
-               (list (search-patch "texi2html-document-encoding.patch")))
+               (list (search-patch "texi2html-document-encoding.patch")
+                     (search-patch "texi2html-i18n.patch")))
               (snippet
                ;; This file is modified by the patch above, but reset its
                ;; timestamp so we don't trigger the rule to update PO files,
-- 
1.7.9.5


[-- Attachment #3: Type: text/plain, Size: 17 bytes --]


-- 
Eric Bavier

  reply	other threads:[~2014-08-16  6:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-11 20:05 bug#18247: Cyclic dependencies in (gnu package *) modules mhw
2014-08-11 20:49 ` mhw
2014-08-11 21:07 ` Ludovic Courtès
2014-08-11 23:59   ` Mark H Weaver
2014-08-12  3:28     ` mhw
2014-08-12  7:31       ` mhw
2014-08-12 13:54         ` Ludovic Courtès
2014-08-12 20:53           ` Eric Bavier
2014-08-13 18:55             ` Mark H Weaver
2014-08-13 22:09             ` Ludovic Courtès
2014-08-16  6:00               ` Eric Bavier [this message]
2014-08-16  9:11                 ` Ludovic Courtès
2014-08-28  9:41           ` Ludovic Courtès
2014-08-12 11:05     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lhqpdldt.fsf@gmail.com \
    --to=ericbavier@gmail.com \
    --cc=18247@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.