Bug 442727 - broken URL links in search/index.tex
broken URL links in search/index.tex
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: R (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Tom "spot" Callaway
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-16 09:58 EDT by George N. White III
Modified: 2008-06-01 06:56 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.7.0-2.fc9.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 06:54:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description George N. White III 2008-04-16 09:58:51 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080325 Fedora/2.0.0.13-1.fc8 Firefox/2.0.0.13 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
CONTENTS files.  



Version-Release number of selected component (if applicable):
R-2.6.2-1.fc8.1

How reproducible:
Always


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



Actual Results:
note the broken URL for the "axis" entry on the resulting page:

    file:///usr/share/doc/library/graphics/html/axis.html
 
 


Expected Results:
The correct location is: 
   file:///usr/lib/R/library/graphics/html/axis.html


Additional info:
One way to fix this would be to put the documentation in a "doc" 
subdirectory:

/usr/share/doc/R-2.6.2/doc/html

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.
Comment 1 Fedora Update System 2008-05-15 12:04:19 EDT
rpy-0.4.6-25.fc7,R-2.7.0-2.fc7.1 has been submitted as an update for Fedora 7
Comment 2 Fedora Update System 2008-05-15 12:07:41 EDT
rpy-1.0.1-4.fc8,R-2.7.0-2.fc8.1 has been submitted as an update for Fedora 8
Comment 3 Fedora Update System 2008-05-15 12:10:44 EDT
rpy-1.0.1-6.fc9,R-2.7.0-2.fc9.1 has been submitted as an update for Fedora 9
Comment 4 Fedora Update System 2008-05-17 18:18:59 EDT
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
Comment 5 Fedora Update System 2008-05-21 06:54:22 EDT
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.
Comment 6 Fedora Update System 2008-05-21 06:56:44 EDT
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.
Comment 7 Fedora Update System 2008-05-21 07:02:56 EDT
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.
Comment 8 George N. White III 2008-05-21 10:54:29 EDT
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 
at /usr/share/doc/library/KernSmooth/html/00Index.html.

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. 


Comment 9 Tom "spot" Callaway 2008-05-21 11:30:57 EDT
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.
Comment 10 Fedora Update System 2008-05-21 13:53:36 EDT
R-2.7.0-3.fc7 has been submitted as an update for Fedora 7
Comment 11 Fedora Update System 2008-05-21 13:56:12 EDT
R-2.7.0-3.fc8 has been submitted as an update for Fedora 8
Comment 12 Fedora Update System 2008-05-21 13:56:56 EDT
R-2.7.0-3.fc9 has been submitted as an update for Fedora 9
Comment 13 Tom "spot" Callaway 2008-05-21 14:11:29 EDT
Well, if it was possible, I made it worse in -3. Ignore that one, I'm working on -4.
Comment 14 Fedora Update System 2008-05-22 16:37:44 EDT
R-2.7.0-4.fc7 has been submitted as an update for Fedora 7
Comment 15 Fedora Update System 2008-05-22 16:38:16 EDT
R-2.7.0-4.fc8 has been submitted as an update for Fedora 8
Comment 16 Fedora Update System 2008-05-22 16:38:51 EDT
R-2.7.0-4.fc9 has been submitted as an update for Fedora 9
Comment 17 Fedora Update System 2008-05-28 22:34:21 EDT
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.
Comment 18 Fedora Update System 2008-05-28 22:35:02 EDT
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.
Comment 19 Fedora Update System 2008-05-28 22:50:32 EDT
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.
Comment 20 jonathan baron 2008-05-30 04:42:21 EDT
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.)

See https://stat.ethz.ch/pipermail/r-devel/2008-May/049732.html.
Comment 21 George N. White III 2008-05-30 18:12:45 EDT
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.
Comment 22 jonathan baron 2008-05-31 08:10:23 EDT
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
../../../../lib64/R/library.

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/.
Comment 23 jonathan baron 2008-06-01 06:56:14 EDT
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
(in https://stat.ethz.ch/pipermail/r-devel/2008-May/049732.html):
"The function used to update doc/html/packages.html is 
utils:::link.html.help(), which is a wrapper for 
tools:::unix.packages.html."

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.

Note You need to log in before you can comment on or make changes to this bug.