Re: Generated GDB documentation have colliding files on a case insensitive files system

Torbjorn SVENSSON via Gdb-patches
2023-01-07T09:42:47Z

On 2023-01-07 10:37, Eli Zaretskii wrote:
>> Date: Sat, 7 Jan 2023 10:21:49 +0100
>> From: Torbjorn SVENSSON <torbjorn.svensson@foss.st.com>
>> CC: Eli Zaretskii <eliz@gnu.org>
>>
>> If the HTML documentation is put on a case insensitive files system
>> (like those used in Windows), there are 2 files that collides:
>> qMemTags.html and QMemTags.html.
>>
>> Both the files contains a simple redirect to their corresponding anchor
>> in General-Query-Packets.html, and there appears to be no link to
>> [qQ]MemTags.html in any of the other generated HTML files.
>> I'm currently leaning towards that these redirect files are not really
>> needed and that they should have been omitted.
>>
>> As it's correct to document both qMemTags and QMemTags, and that the two
>> RSP commands are indeed different, I see the following potential
>> solutions to the collision:
>>
>> * Leave it as is and live with the collision for users extracting an
>> archive with the HTML documentation on a case insensitive files system.
>>
>> * Use the "--no-split" argument to makeinfo to generate a single big
>> HTML file for all the documentation rather than one HTML file per @node.
>> This solution might have other consequences that I'm not aware of as
>> there are multiple texi files in the GDB source tree...
>>
>> * After invoking makeinfo, remove all the generated redirect pages
>> (appears to be ~214 files).
>>
>>
>> Is there any other solution that I have no thought of?
>
> Yes, there are other solutions. For example, one of the files could
> have been renamed to a different name, when the collision is detected.
>
> FWIW, the old makeinfo 4.x did succeed to avoid file-name conflicts in
> this and other similar cases. That solution it used was lost when
> makeinfo was reimplemented in Perl, and AFAIU it cannot be easily
> adopted by the current makeinfo implementation, because it changed the
> way nodes are references in the "<a href" links of the produced HTML.

Ok. I've never really cared about how the makeinfo command works for
even looked at the implementation prior to noticing this issue and
sending the patch yesterday.

Do you see any use of the ~214 redirect pages in the GDB context?

>
>> I've also started a thread on the bug-texinfo list about adding a
>> warning for this problem when running the makeinfo command. The thread
>> can be found here:
>> https://lists.gnu.org/archive/html/bug-texinfo/2023-01/msg00030.html
>
> Let's wait for that other discussion to conclude, and then take it
> from there. I'd prefer a solution in Texinfo rather than in GDB, as
> this is a general problem.

I agree.