lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <272c0cfc-188a-41c7-9ba1-e1ba0f996298@gmail.com>
Date:   Fri, 3 Nov 2023 09:09:28 +0900
From:   Akira Yokosawa <akiyks@...il.com>
To:     Vegard Nossum <vegard.nossum@...cle.com>
Cc:     alexs@...nel.org, carlos.bilbao@....com, corbet@....net,
        federico.vaga@...a.pv.it, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, siyanteng@...ngson.cn,
        src.res.211@...il.com, Jani Nikula <jani.nikula@...ux.intel.com>,
        Akira Yokosawa <akiyks@...il.com>
Subject: Re: [PATCH] docs: translations: add translations links when they
 exist

On 2023/11/02 20:07, Vegard Nossum wrote:
> On 01/11/2023 15:56, Akira Yokosawa wrote:
>> It looks like this introduces hysteresis in successive runs of
>> "make htmldocs" and "make latexdocs".
>>
>> Steps to reproduce
>>
>>    1. Run "make cleandocs"
>>
>>    2. Run "make htmldocs"
>>
>>    3. Run "make latexdocs"
>>
>> This aborts with the message (under Sphinx 7.2.6):
>>
>>    Extension error (translations):
>>    Handler <function process_languages at 0x7f122f343420> for event 'doctree-resolved' threw an exception (exception: 'LaTeXBuilder' object has no attribute 'templates')
>>    make[2]: *** [Documentation/Makefile:128: latexdocs] Error 2
>>    make[1]: *** [/linux/Makefile:1695: latexdocs] Error 2
>>    make: *** [Makefile:234: __sub-make] Error 2
>>    Command exited with non-zero status 2
>>
>> If I run "make latexdocs" in step 2 and "make htmldocs" in step 3,
>> both runs complete successfully, but html pages don't have the
>> expected links to other translations.
>>
>> All I can do is to report the symptoms.
>> Vegard, can you look into them?
> 
> Thanks for testing this out and reporting!
> 
> I think we can fix this by moving the "is this html output?" check from
> the TranslationsTransform into the 'doctree-resolved' handler (which, as
> far as I can tell, runs after the doctree has been serialized to disk
> but before output is generated).
> 
> I've attached an incremental patch, does that seem to work for you? I> test both (clean/html/latex + clean/latex/html) and it seemed to work here.

Yes, it works here as well.

        Thanks, Akira

> 
> I had a look at using a custom "visit" callback that would just render
> the HTML in place instead of manipulating the doctree, but it also
> doesn't feel right as then you need to specify callbacks for every
> output writer; there doesn't seem to be a way to ignore the node by
> default. Maybe I should ask on the Sphinx/docutils mailing lists what
> the "proper" way to do this would be.
> 
> Thanks again!
> 
> 
> Vegard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ