GNU bug report logs - #64881
[translation] M-x texinfo-all-menus-update breaks translated cookbook

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Wed, 26 Jul 2023 19:34:02 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64881 in the body.
You can then email your comments to 64881 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#64881; Package guix. (Wed, 26 Jul 2023 19:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 26 Jul 2023 19:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: bug-guix <bug-guix <at> gnu.org>
Subject: [translation] M-x texinfo-all-menus-update breaks translated cookbook
Date: Wed, 26 Jul 2023 15:33:08 -0400
Hi,

When attempting to run `M-x texinfo-all-menus-update' from Emacs on the
guix-cookbook.texi file, it builds fine, but auto-generated translated
variants do not, which breaks 'make as-derivation' (or 'guix pull').

The error reported by 'make as-derivation' is:

--8<---------------cut here---------------start------------->8---
guix.es.texi:19860: warning: `.' or `,' must follow @xref, not p
guix.es.texi:46332: warning: `.' or `,' must follow @xref, not p
guix.fr.texi:15422: warning: `.' or `,' must follow @xref, not p
Wide character in warn at /gnu/store/9d7c6c8id6dh0inpqvcgb708mmiqcj4c-texinfo-6.8/bin/makeinfo line 637.
guix.ru.texi:13064: warning: `.' or `,' must follow @xref, not д
guix-cookbook.de.texi:570: @menu reference to nonexistent node `A ``Hello World'' package'
guix-cookbook.de.texi:571: @menu reference to nonexistent node `Setup'
guix-cookbook.de.texi:572: @menu reference to nonexistent node `Extended example'
guix-cookbook.de.texi:573: @menu reference to nonexistent node `Other build systems'
guix-cookbook.de.texi:574: @menu reference to nonexistent node `Programmable and automated package definition'
guix-cookbook.de.texi:575: @menu reference to nonexistent node `Getting help'
guix-cookbook.de.texi:576: @menu reference to nonexistent node `Conclusion'
guix-cookbook.de.texi:801: @menu reference to nonexistent node `Local file'
guix-cookbook.de.texi:802: @menu reference to nonexistent node `Channels'
guix-cookbook.de.texi:1510: @menu reference to nonexistent node `Recursive importers'
guix-cookbook.de.texi:1511: @menu reference to nonexistent node `Automatic update'
guix-cookbook.de.texi:3358: @menu reference to nonexistent node `A Database Container'
guix-cookbook.de.texi:3657: @menu reference to nonexistent node `Basic setup with manifests'
guix-cookbook.de.texi:3658: @menu reference to nonexistent node `Required packages'
guix-cookbook.de.texi:3659: @menu reference to nonexistent node `Default profile'
guix-cookbook.de.texi:3660: @menu reference to nonexistent node `The benefits of manifests'
guix-cookbook.de.texi:116: @detailmenu reference to nonexistent node `A ``Hello World'' package'
guix-cookbook.de.texi:117: @detailmenu reference to nonexistent node `Setup'
guix-cookbook.de.texi:118: @detailmenu reference to nonexistent node `Extended example'
guix-cookbook.de.texi:119: @detailmenu reference to nonexistent node `Other build systems'
guix-cookbook.de.texi:120: @detailmenu reference to nonexistent node `Programmable and automated package definition'
guix-cookbook.de.texi:121: @detailmenu reference to nonexistent node `Getting help'
guix-cookbook.de.texi:122: @detailmenu reference to nonexistent node `Conclusion'
guix-cookbook.de.texi:129: @detailmenu reference to nonexistent node `Local file'
guix-cookbook.de.texi:130: @detailmenu reference to nonexistent node `Channels'
guix-cookbook.de.texi:137: @detailmenu reference to nonexistent node `Recursive importers'
guix-cookbook.de.texi:138: @detailmenu reference to nonexistent node `Automatic update'
guix-cookbook.de.texi:193: @detailmenu reference to nonexistent node `A Database Container'
guix-cookbook.de.texi:207: @detailmenu reference to nonexistent node `Basic setup with manifests'
guix-cookbook.de.texi:208: @detailmenu reference to nonexistent node `Required packages'
guix-cookbook.de.texi:209: @detailmenu reference to nonexistent node `Default profile'
guix-cookbook.de.texi:210: @detailmenu reference to nonexistent node `The benefits of manifests'
Backtrace:
           3 (primitive-load "/gnu/store/jcpsgx9pswha51a014fdi5rlpsk?")
In ice-9/eval.scm:
    619:8  2 (_ #f)
In ice-9/boot-9.scm:
   260:13  1 (for-each #<procedure 7ffff4f91f80 at ice-9/eval.scm:3?> ?)
In guix/build/utils.scm:
    812:6  0 (invoke "/gnu/store/9d7c6c8id6dh0inpqvcgb708mmiqcj4c-t?" ?)

guix/build/utils.scm:812:6: In procedure invoke:
ERROR:
  1. &invoke-error:
      program: "/gnu/store/9d7c6c8id6dh0inpqvcgb708mmiqcj4c-texinfo-6.8/bin/makeinfo"
      arguments: ("./guix-cookbook.de.texi" "-I" "/gnu/store/ah2fdy1vkac5blsdm2ai654h4gwgib21-doc" "-I" "." "-o" "/gnu/store/zb7vmqbbwl5s9i26zdhxpks1xrcr5npz-guix-manual/guix-cookbook.de.info")
      exit-status: 1
      term-signal: #f
      stop-signal: #f
builder for `/gnu/store/6fah4ipa15w46npk919f4i5hka5jhphg-guix-manual.drv' failed with exit code 1
cannot build derivation `/gnu/store/x34kb0nk9h2mdjj6hydlvsjphdakakpr-guix-20230726.19.drv': 1 dependencies couldn't be built
error: build of `/gnu/store/x34kb0nk9h2mdjj6hydlvsjphdakakpr-guix-20230726.19.drv' failed
make: *** [Makefile:7009 : as-derivation] Erreur 1
--8<---------------cut here---------------end--------------->8---

Would someone know how to get this to work?  Manually maintaining menus
in Texinfo is a pain.

-- 
Thanks,
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#64881; Package guix. (Thu, 27 Jul 2023 12:33:01 GMT) Full text and rfc822 format available.

Message #8 received at 64881 <at> debbugs.gnu.org (full text, mbox):

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 64881 <at> debbugs.gnu.org
Subject: Re: bug#64881: [translation] M-x texinfo-all-menus-update breaks
 translated cookbook
Date: Thu, 27 Jul 2023 14:31:59 +0200
Hello Maxim,

I never used M-x texinfo-all-menus-update before and do not know which
package or output provides it.

As I understand, presumably the PO4A / POXREF step of make was
interrupted and therefore there are half-complete stray .de.texi files.
Otherwise, the references would be translated or the .de.texi files
would not exist.

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> variants do not, which breaks 'make as-derivation' (or 'guix pull').

IIUC 'make as-derivation' uses the files from the guix directory, but
'guix pull' uses the files from a repo checkout and was not / cannot be
broken by stray files.

Regards,
Florian




Information forwarded to bug-guix <at> gnu.org:
bug#64881; Package guix. (Thu, 27 Jul 2023 15:30:02 GMT) Full text and rfc822 format available.

Message #11 received at 64881 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>, Maxim
 Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 64881 <at> debbugs.gnu.org
Subject: Re: bug#64881: [translation] M-x texinfo-all-menus-update breaks
 translated cookbook
Date: Thu, 27 Jul 2023 17:29:40 +0200
[Message part 1 (text/plain, inline)]
Hi everyone,

"pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> writes:

> IIUC 'make as-derivation' uses the files from the guix directory, but
> 'guix pull' uses the files from a repo checkout and was not / cannot be
> broken by stray files.

`make as-derivation` uses #:select? git? to restrict to only files
that are checked out in git.  It doesn't try to get the contents of HEAD
though, the working directory's state is used instead.

Best,
-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#64881; Package guix. (Thu, 27 Jul 2023 15:50:02 GMT) Full text and rfc822 format available.

Message #14 received at 64881 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 64881 <at> debbugs.gnu.org,
 "pelzflorian \(Florian Pelz\)" <pelzflorian <at> pelzflorian.de>
Subject: Re: bug#64881: [translation] M-x texinfo-all-menus-update breaks
 translated cookbook
Date: Thu, 27 Jul 2023 11:49:04 -0400
[Message part 1 (text/plain, inline)]
Hello,

Josselin Poiret <dev <at> jpoiret.xyz> writes:

> Hi everyone,
>
> "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> writes:
>
>> IIUC 'make as-derivation' uses the files from the guix directory, but
>> 'guix pull' uses the files from a repo checkout and was not / cannot be
>> broken by stray files.
>
> `make as-derivation` uses #:select? git? to restrict to only files
> that are checked out in git.  It doesn't try to get the contents of HEAD
> though, the working directory's state is used instead.

Both 'make as-derivation' and 'guix pull' exhibit the same problem, in
case that wasn't clear.

M-x texinfo-update-all-menus is available out-of-the-box in Emacs, when
visiting a .texi file (you invoke it via Alt-x texinfo-update-all-menus
or by visiting the 'Texinfo -> Update All Menus' menu).

Attached is the patch resulting from such action, the one that when
applied breaks 'make as-derivation'.
[0001-doc-guix-cookbook-Update-all-Texinfo-menus.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Thanks,
Maxim

Information forwarded to bug-guix <at> gnu.org:
bug#64881; Package guix. (Thu, 27 Jul 2023 19:06:02 GMT) Full text and rfc822 format available.

Message #17 received at 64881 <at> debbugs.gnu.org (full text, mbox):

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, 64881 <at> debbugs.gnu.org
Subject: Re: bug#64881: [translation] M-x texinfo-all-menus-update breaks
 translated cookbook
Date: Thu, 27 Jul 2023 21:05:32 +0200
[Message part 1 (text/plain, inline)]
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> M-x texinfo-update-all-menus is available out-of-the-box in Emacs, when
> visiting a .texi file (you invoke it via Alt-x texinfo-update-all-menus
> or by visiting the 'Texinfo -> Update All Menus' menu).

Oops my bad.  I should have expected that Emacs commands are invisible
unless the right Emacs mode is used.  Thank you for clarifying and
presenting as a patch.

Josselin Poiret <dev <at> jpoiret.xyz> writes:
> `make as-derivation` uses #:select? git? to restrict to only files
> that are checked out in git.  It doesn't try to get the contents of HEAD
> though, the working directory's state is used instead.

Oh hmm doc/guix-cookbook.de.texi is not checked in, so even `make
as-derivation` should have worked ...

This got nothing to do with stray .de.texi files.  Apparently it is
because the menu entries lack menu descriptions (which should be
optional according to `info texinfo').

The attached patch on top of your patch helps ...

Either we add optional descriptions everywhere or not update menu
entries without description or change how po4a translates the menu
entries in po4a source file lib/Locale/Po4a/Texinfo.pm in
translate_buffer_menuentry, to make po4a translate when there is no
description.  I don’t plan to do that though.

Regards,
Florian
[doc-guix-cookbook-Also-add-Texinfo-menu-description.patch (text/x-patch, attachment)]

Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Wed, 16 Aug 2023 15:21:01 GMT) Full text and rfc822 format available.

Notification sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
bug acknowledged by developer. (Wed, 16 Aug 2023 15:21:02 GMT) Full text and rfc822 format available.

Message #22 received at 64881-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, 64881-done <at> debbugs.gnu.org
Subject: Re: bug#64881: [translation] M-x texinfo-all-menus-update breaks
 translated cookbook
Date: Wed, 16 Aug 2023 11:20:06 -0400
Hi Florian,

"pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> writes:

> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>> M-x texinfo-update-all-menus is available out-of-the-box in Emacs, when
>> visiting a .texi file (you invoke it via Alt-x texinfo-update-all-menus
>> or by visiting the 'Texinfo -> Update All Menus' menu).
>
> Oops my bad.  I should have expected that Emacs commands are invisible
> unless the right Emacs mode is used.  Thank you for clarifying and
> presenting as a patch.
>
> Josselin Poiret <dev <at> jpoiret.xyz> writes:
>> `make as-derivation` uses #:select? git? to restrict to only files
>> that are checked out in git.  It doesn't try to get the contents of HEAD
>> though, the working directory's state is used instead.
>
> Oh hmm doc/guix-cookbook.de.texi is not checked in, so even `make
> as-derivation` should have worked ...
>
> This got nothing to do with stray .de.texi files.  Apparently it is
> because the menu entries lack menu descriptions (which should be
> optional according to `info texinfo').
>
> The attached patch on top of your patch helps ...
>
> Either we add optional descriptions everywhere or not update menu
> entries without description or change how po4a translates the menu
> entries in po4a source file lib/Locale/Po4a/Texinfo.pm in
> translate_buffer_menuentry, to make po4a translate when there is no
> description.  I don’t plan to do that though.

I've modified po4a to support this use case, with tests and all!  Pushed
as 352c49e1a5c48eb76389ee384eb95fc2e4a6ab32, with coobook menus updated
in the following commit.

Thanks for the analysis and pointers!

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 14 Sep 2023 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 337 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.