Bug 204017

Summary: man.cgi does not default to latest version+ports
Product: Documentation Reporter: c.brinkhaus
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed Overcome By Events    
Severity: Affects Many People CC: allanjude, andipersti, wblock
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Change default man path in man.cgi
none
Use vendor attribute if available none

Description c.brinkhaus 2015-10-25 18:19:26 UTC
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-config.html
section 5.4 liks to xrandr(1). Clicking to the link opens https://www.freebsd.org/cgi/man.cgi?query=xrandr&sektion=1 with the result

Sorry, no data found for `xrandr(1)'. Please try a keyword search.
You may look for other FreeBSD Search Services.

I did not found a man page of xrandr.
Comment 1 Allan Jude freebsd_committer freebsd_triage 2015-10-25 18:21:00 UTC
Likely a problem with the links, but, it does work if you change the search to be 'FreeBSD 10.2 plus ports'

Maybe that should be the default? or we should fix the man page entity in the handbook to be a version that includes ports
Comment 2 c.brinkhaus 2015-10-25 18:33:37 UTC
Dear Allan,

thank you for the very fast reply. I confirm that changing the search option works for me. I was not aware of the additional option.

It would be more user friendly if the link opens without having to change the option. I have not the knowledge to judge if this must be a global change or only a modification of a few links.

Thank you!
Comment 3 Andreas Perstinger 2015-11-24 12:43:27 UTC
As noticed by Allan Jude, the easy fix would be to change the default man path in man.cgi.

Another solution would be to use the "vendor" attribute (as explained in share/xml/man-refs.ent) if it exists on the "citerefentry" element and add the corresponding "manpath" URL parameter to the link. But then we also need to add two more aliases in man.cgi because the vendor values "xorg" (currently used by 17 entries) and "ports" (currently used by 40 entries) are not known to the script. 

("current" isn't known either but the 5 entries in man-refs.ent that use it [devfs, device.hints, nullfs, acpiconf, usbconfig] are all in the base system and when the value of the "manpath" parameter isn't known to the script, it falls back to the default. Thus I would rather modify the entries in man-refs.ent, i.e. remove the vendor attribute from these entries.)
Comment 4 Andreas Perstinger 2015-11-24 12:44:03 UTC
Created attachment 163471 [details]
Change default man path in man.cgi
Comment 5 Andreas Perstinger 2015-11-24 12:45:03 UTC
Created attachment 163472 [details]
Use vendor attribute if available
Comment 6 Andreas Perstinger 2016-02-21 16:08:33 UTC
IMO this bug can be closed. Warren Block fixed the generated links in r48222 https://svnweb.freebsd.org/doc?view=revision&revision=48222