Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 442194 - Links to eclass references are broken
Summary: Links to eclass references are broken
Status: RESOLVED FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Devmanual (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Devmanual Team
URL: http://devmanual.gentoo.org/ebuild-wr...
Whiteboard:
Keywords:
: 475332 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-07 14:21 UTC by Michael Palimaka (kensington)
Modified: 2020-01-16 19:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gen-eclass.html.sh (gen-eclass-html.sh,5.19 KB, text/plain)
2012-11-07 16:03 UTC, Theo Chatzimichos (RETIRED)
Details
run-update.sh (run-update.sh,921 bytes, text/plain)
2012-11-07 16:04 UTC, Theo Chatzimichos (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Palimaka (kensington) gentoo-dev 2012-11-07 14:21:01 UTC
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.
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2012-11-07 14:25:40 UTC
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
Comment 2 Michael Palimaka (kensington) gentoo-dev 2012-11-07 14:31:30 UTC
(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.
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2012-11-07 14:54:53 UTC
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
Comment 4 Michael Palimaka (kensington) gentoo-dev 2012-11-07 15:34:32 UTC
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?)
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2012-11-07 15:37:36 UTC
(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)
Comment 6 Michael Palimaka (kensington) gentoo-dev 2012-11-07 15:47:45 UTC
(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
Comment 7 Markos Chandras (RETIRED) gentoo-dev 2012-11-07 15:54:13 UTC
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.
Comment 8 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2012-11-07 16:03:03 UTC
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
Comment 9 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2012-11-07 16:03:59 UTC
Created attachment 328700 [details]
gen-eclass.html.sh
Comment 10 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2012-11-07 16:04:13 UTC
Created attachment 328702 [details]
run-update.sh
Comment 11 Michael Palimaka (kensington) gentoo-dev 2012-11-08 08:06:08 UTC
Local testing suggests that the xsl conditional for using index.html is failing, and xsltproc is thus looking for the non-existent text.xml
Comment 12 Markos Chandras (RETIRED) gentoo-dev 2012-11-08 09:03:59 UTC
(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 ? :)
Comment 13 Michael Palimaka (kensington) gentoo-dev 2012-11-08 09:38:27 UTC
(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.
Comment 14 Markos Chandras (RETIRED) gentoo-dev 2012-11-08 09:40:08 UTC
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.
Comment 15 Michael Palimaka (kensington) gentoo-dev 2016-01-24 12:49:44 UTC
This is since working again.
Comment 16 Ulrich Müller gentoo-dev 2020-01-15 20:02:18 UTC
Reopening. This isn't really fixed, but only a workaround is in place.
Comment 17 Ulrich Müller gentoo-dev 2020-01-15 20:13:05 UTC
Proposed solution: https://github.com/gentoo/devmanual/pull/144.
Please review.
Comment 18 Larry the Git Cow gentoo-dev 2020-01-16 18:53:03 UTC
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(+)
Comment 19 Ulrich Müller gentoo-dev 2020-01-16 19:00:03 UTC
*** Bug 475332 has been marked as a duplicate of this bug. ***