Red Hat Bugzilla – Bug 442727
broken URL links in search/index.tex
Last modified: 2008-06-01 06:56:14 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:126.96.36.199) Gecko/20080325 Fedora/188.8.131.52-1.fc8 Firefox/184.108.40.206 pango-text
Description of problem:
the search function returns a page with broken links, take directly from
/usr/share/doc/R-2.6.2/html/search/index.txt. This file is generated by
/usr/lib/rpm/R-make-search-index.sh, which simply cats the package
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. firefox /usr/share/doc/R-2.6.2/html/index.html
2. click on "Search Engine & Keywords"
[The search engine is reported to fail using icedtea. I'm
using Sun's jre 1.6.]
3. enter a search term, e.g., axis
note the broken URL for the "axis" entry on the resulting page:
The correct location is:
One way to fix this would be to put the documentation in a "doc"
and create a symbolic link
/usr/share/doc/R-2.6.2/library --> /usr/lib/R/library
Another approach would be to have the script that generates
index.txt edt the URL lines.
rpy-0.4.6-25.fc7,R-2.7.0-2.fc7.1 has been submitted as an update for Fedora 7
rpy-1.0.1-4.fc8,R-2.7.0-2.fc8.1 has been submitted as an update for Fedora 8
rpy-1.0.1-6.fc9,R-2.7.0-2.fc9.1 has been submitted as an update for Fedora 9
R-2.7.0-2.fc9.1, rpy-1.0.1-6.fc9 has been pushed to the Fedora 9 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update R rpy'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-4012
R-2.7.0-2.fc9.1, rpy-1.0.1-6.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.
rpy-1.0.1-4.fc8, R-2.7.0-2.fc8.1 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.
R-2.7.0-2.fc7.1, rpy-0.4.6-25.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.
There is still a problem with the R documentation in R-2.7.0-2.fc8.
I see no change in the broken directory structure from the previous
version. The bad links can be seen without using the search engine.
$ firefox /usr/share/doc/R-2.7.0/html/index.html
Select Packages and the the first link, you get:
Firefox can't find the file
A workaround is to create a doc directory and 3 symbolic links:
# cd /usr/share/doc/R-2.7.0/
# mkdir doc
# ln -s /usr/lib/R/library .
# ln -s html doc/
# ln -s manual doc/
Alternatively, '/usr/lib/rpm/R-make-search-index.sh' should also rewrite
the 'html/packages.html' file.
I didn't fix the directory structure, because that is how upstream R wants to do
things going forward. Instead, I fixed the search indexes. Good catch on the
packages.html file having broken links, but that is easy to fix inside the spec
with a sed invocation. Please test R-2.7.0-3, as that should resolve all the
issues I can see.
R-2.7.0-3.fc7 has been submitted as an update for Fedora 7
R-2.7.0-3.fc8 has been submitted as an update for Fedora 8
R-2.7.0-3.fc9 has been submitted as an update for Fedora 9
Well, if it was possible, I made it worse in -3. Ignore that one, I'm working on -4.
R-2.7.0-4.fc7 has been submitted as an update for Fedora 7
R-2.7.0-4.fc8 has been submitted as an update for Fedora 8
R-2.7.0-4.fc9 has been submitted as an update for Fedora 9
R-2.7.0-4.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.
R-2.7.0-4.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.
R-2.7.0-4.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.
With R-2.7.0-4.fc9, the links in /usr/share/doc/R-2.7.0/html/packages.html are
written as (for example) "../../library/acepack/html/00Index.html", which seems
to me to be the same problem described in this bug. One solution, aside from
comment #8, is to change them to /usr/lib/R/library/acepack/html/00Index.html.
In earlier versions of R, the packages.html file was actually in
/usr/lib/R/doc/, which was better because it did not require the version number
for linking. But I asked about this on the R-devel mailing list, and,
apparently, the changed location of the packages.html file has some reason.
(Brian Ripley said that it required rebuilding too much. But in the current rpm
the packages.html file is rebuilt with every update, which is, I think, exactly
what should happen, and exactly what used to happen. Thus, I do not understand
why the packages.html file is where it is now. It is possible that the Fedora
rpm works differently than what happens if you build from source, which is why I
am reporting here rather than R-devel.)
I can confirm this with R-2.7.0-4.fc8. The problem is that the various files are
updated when an package is installed using R install.packages(), but the script
in /usr/lib/rpm needs to be run again or install.packages() needs to provide
absolute paths when it writes the files.
In R-2.7.0-5.fc9.x86_64, which was said to fix the problem, a problem is still
present. The packages.html file is in /usr/share/doc/R-2.7.0/html/ and the
links to packages go to ../../library/, which resolves to
/usr/share/doc/library, which is wrong. It should be /usr/lib64/R/, or
But this is a little crazy because it must depend on whether you have lib or
lib64. Thus, an even simpler solution would be go to back to the old behavior
of putting the doc directory in /usr/lib64/R or /usr/lib/R, where it used to be.
Perhaps this violates Fedora policy.
What is clear, though, is that the argument in
https://stat.ethz.ch/pipermail/r-devel/2008-May/049732.html, is not relevant to
this issue. The packages.html file is getting rebuilt every time you update
anything, which is, I think, exactly what should happen.
In the meantime I'm putting a soft link to /usr/lib64/R/library in /usr/share/doc/.
I realized that the problem has been fixed for the initial packages.html file
that is built when R is installed. However, the problem in comment 22 is still
present after updating or installing packages.
According to Brian Ripley
"The function used to update doc/html/packages.html is
utils:::link.html.help(), which is a wrapper for
It may be that this is not worth fixing. I may be the only one who uses
packages.html extensively (at http://finzi.psych.upenn.edu, where it lists all
the packages and provides direct links to their html pages, a function that to
my knowledge exists nowhere else). And it is working for me now because of the
soft link that I created.