There are a number of references in the devmanual source that look like this: <uri link="::eclass-reference/bash-completion.eclass/"/> These are being translated to look like this: <a href="../../eclass-reference/bash-completion.eclass/index.html"></a> Is the link text supposed to be populated automatically in this case? If not, I will prepare a patch fixing this.
What exactly is the problem? Are the links broken? The final html page is autogenerated by an infra script and the href links are generated/fixed by this script as well
(In reply to comment #1) > What exactly is the problem? Are the links broken? The final html page is > autogenerated by an infra script and the href links are generated/fixed by > this script as well Yes, they have no text: > These are being translated to look like this: <a > href="../../eclass-reference/bash-completion.eclass/index.html"></a> Look at the last sentence in $URL.
hmm not sure if there is something wrong with the infra script or with the devmanual syntax. Can you please write a simple patch that could if that on the devmanual level? It may be hard to test it though without the infra script
Yes, I'm not really sure how to test without seeing what infra is working with. Investigating further, it seems that the link text is extracted from <title> in text.xml. So, perhaps that is that is no longer present in what the infra scripts are generating? (It did work at some point, right?)
(In reply to comment #4) > Yes, I'm not really sure how to test without seeing what infra is working > with. > > Investigating further, it seems that the link text is extracted from <title> > in text.xml. So, perhaps that is that is no longer present in what the infra > scripts are generating? (It did work at some point, right?) Does it work if you replace <uri link="::eclass-reference/bash-completion.eclass/"/> with <uri link="::eclass-reference/bash-completion.eclass/>MyCoolText</uri> I guess that should do the trick. Infra, would it be possible to share the script with all of us? you can either commit it in the devmanual git repo or just attach it here (although we will forget about it again in the future)
(In reply to comment #5) > <uri link="::eclass-reference/bash-completion.eclass/"/> > > with > > <uri link="::eclass-reference/bash-completion.eclass/>MyCoolText</uri> > > I guess that should do the trick. Yes, that style of link was never an issue. The wayback machine[1] confirms that it used to work, so I guess something must have changed on the infra side. [1]: http://web.archive.org/web/20100211191004/http://devmanual.gentoo.org/ebuild-writing/using-eclasses/index.html
The problem is that the eclass-reference/ directory is generated by the infra script. This uses the eclass-manpages and then it runs man2html(?) to create it. So we probably need to see the script (again) and figure out what to do to fix it during runtime.
I'll attach the scripts here for now, please don't commit them in your devmanual repo yet, I'll try to find a way to update the deployment and move the scripts out of cfengine repo
Created attachment 328700 [details] gen-eclass.html.sh
Created attachment 328702 [details] run-update.sh
Local testing suggests that the xsl conditional for using index.html is failing, and xsltproc is thus looking for the non-existent text.xml
(In reply to comment #11) > Local testing suggests that the xsl conditional for using index.html is > failing, and xsltproc is thus looking for the non-existent text.xml Patch ? :)
(In reply to comment #12) > Patch ? :) The offending call seems to be here: http://git.overlays.gentoo.org/gitweb/?p=proj/devmanual.git;a=blob;f=devbook.xsl#l323 but I don't know enough about XSL to know why.
Wouldn't it be possible to patch it (sed, awk, etc) in gen-eclass.html.sh script to generate the correct links? CC'ing flameeyes who I suspect has a decent understanding on the xsl stuff.
This is since working again.
Reopening. This isn't really fixed, but only a workaround is in place.
Proposed solution: https://github.com/gentoo/devmanual/pull/144. Please review.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=3d9337265a479f4025207348138877d844a9d943 commit 3d9337265a479f4025207348138877d844a9d943 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2020-01-15 20:04:15 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2020-01-16 18:49:08 +0000 devbook.xsl: Fix links to eclass references. Closes: https://bugs.gentoo.org/442194 Signed-off-by: Ulrich Müller <ulm@gentoo.org> devbook.xsl | 6 ++++++ 1 file changed, 6 insertions(+)
*** Bug 475332 has been marked as a duplicate of this bug. ***