In the webpage for the ports textproc category, the link to the long description for fop has the revision parameter repeated twice. This is confusing svnweb, which will come up with an error if you attempt to access the long description FreeBSD Ports: Textproc URL: http://www.freebsd.org/./ports/textproc.html#fop-2.0_1 Linkname: Long description URL: https://svnweb.FreeBSD.org/ports/head/textproc/fop/pkg-descr?revision=HEAD?revision=HEAD I'm giving fop as as example. There are several (many?) other cases of this bug.
This bug affects every port which is listed in more than one category. Another example would be Zope 2.13. This port is listed in 3 categories: Python: https://www.freebsd.org/ports/python.html#zope213-2.13.23 (generated long description link: https://svnweb.freebsd.org/ports/head/www/zope213/pkg-descr?revision=HEAD ) WWW: https://www.freebsd.org/ports/www.html#zope213-2.13.23 (generated long description link: https://svnweb.freebsd.org/ports/head/www/zope213/pkg-descr?revision=HEAD?revision=HEAD ) Zope: https://www.freebsd.org/ports/zope.html#zope213-2.13.23 (generated long description link: https://svnweb.freebsd.org/ports/head/www/zope213/pkg-descr?revision=HEAD?revision=HEAD?revision=HEAD ) As you can see, in each category another copy of the string "?revision=HEAD" is appended to the link to the long description. The bug is in https://svnweb.freebsd.org/doc/head/en_US.ISO8859-1/htdocs/ports/portindex?view=markup . On line 194, the loop goes through all the categories of a port (in alphabetical order) and creates the output string for the web page. On line 200 the string "?revision=HEAD" is appended to the $ldesc string. But $ldesc doesn't change inside the loop (except in the first iteration) thus more copies are appended in each iteration. IMHO most of the body of the foreach loop should be outside it because most lines process the ports data in each iteration in the same way. Only line 195 and lines 241-258 should be inside the loop.
That might explain why textproc/py-reverend has revision=HEAD repeated 4 times.
Sorry, that should be py27-reverend in the textproc category
Created attachment 166340 [details] diff to portindex script
Has this bug been fixed? It seems to be working for textproc/py27-reverend on the web site. I can't see any mention in the svn log for portindex though.
(In reply to Dave Evans from comment #5) No the bug is still not fixed. How did you test the py27-reverend port? If you use the port search form, then the generated result page doesn't use the portindex script and thus the bug doesn't show up. The portindex script only creates the category listing pages. E.g. if you go to Categories Listed By Groups (https://www.freebsd.org/ports/categories-grouped.html) and there follow the link for the Textproc category, the link to the long description for py27-reverend still doesn't work.
> How did you test the py27-reverend port? I used lynx on the port search form. You are right. I should have used the port index, which is still broken.
*** Bug 215926 has been marked as a duplicate of this bug. ***
The attached patch works. Can someone from doc@ either approve or commit?
A commit references this bug: Author: gahr Date: Tue Jan 10 15:52:40 UTC 2017 New revision: 49825 URL: https://svnweb.freebsd.org/changeset/doc/49825 Log: Fix double param in Long desc for ports in more than 1 category PR: 206709 Submitted by: linimon Reported by: Dave Evans <dave.evans55@googlemail.com> Approved by: brd Changes: head/en_US.ISO8859-1/htdocs/ports/portindex