Bug 237398

Summary: Wrong haddock-* paths in package.conf
Product: [Fedora] Fedora Reporter: Roberto Zunino <zunino>
Component: ghcAssignee: Bryan O'Sullivan <bos>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: 7CC: petersen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-15 23:12:48 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 425974    
Bug Blocks:    

Description Roberto Zunino 2007-04-21 18:54:31 EDT
Description of problem:

In the package.conf for haddock-* paths /usr/share is used instead of
/usr/share/doc. This makes Haddock unable to link user docs to system installed
ones. Haddock emits warnings when used.

As a dirty fix, this *seems* to produce an ok package.conf
sed -e 's_/usr/share/ghc_/usr/share/doc/ghc_g' \
   < /usr/lib64/ghc-%{version}/package.conf

Version-Release number of selected component (if applicable):

ghc66-6.6-1.fc6

Steps to Reproduce:

ghc-pkg describe base | grep haddock
  
Actual results:

haddock-interfaces: /usr/share/ghc-6.6/html/libraries/base/base.haddock
haddock-html: /usr/share/ghc-6.6/html/libraries/base

Expected results:

haddock-interfaces: /usr/share/doc/ghc-6.6/html/libraries/base/base.haddock
haddock-html: /usr/share/doc/ghc-6.6/html/libraries/base
Comment 1 Bryan O'Sullivan 2007-06-09 12:38:30 EDT
Jens, I can take this.  Reassign to yourself if you really, really want it :-)
Comment 2 Jens Petersen 2007-06-13 01:42:05 EDT
Thanks, Bryan.

BTW is this a ghc bug or an haddock issue?
Comment 3 Bryan O'Sullivan 2007-06-13 02:08:31 EDT
Don't know yet :-)
Comment 4 Till Maas 2008-01-06 16:18:13 EST
This bug is still present in Fedora 7.
Comment 5 Jens Petersen 2008-01-06 21:44:59 EST
Our ghc-6.6.1 had /usr/share/ghc-6.6.1/html/libraries/<package>.

We are overriding docdir when build the ghc haddock files but
that doesn't seem to be reaching the package.conf file.

It would be good to ask about it upstream anyway IMHO.
Comment 6 Jens Petersen 2008-01-06 21:52:27 EST
Otherwise a simple workaround for now would be just to tweak
the package.conf file with "sed -i" say.  Though that would be a bad hack.
Comment 7 Bryan O'Sullivan 2008-01-06 22:20:06 EST
I'm trying a fix with the configure script.  If that doesn't work, I'll file a
bug upstream and write a sed script to mangle package.conf.
Comment 8 Bryan O'Sullivan 2008-01-06 23:05:20 EST
There is indeed an upstream bug:

http://hackage.haskell.org/trac/ghc/ticket/2020

But I might have a workaround.  I've got a build going in koji right now:

http://koji.fedoraproject.org/koji/taskinfo?taskID=330010
Comment 9 Bryan O'Sullivan 2008-01-07 18:04:29 EST
That took a lot of work, but here's a fixed version.  It's in F-8 testing now.

http://koji.fedoraproject.org/koji/buildinfo?buildID=30503
Comment 10 Fedora Update System 2008-01-11 17:12:37 EST
ghc-6.8.2-8.fc8 has been pushed to the Fedora 8 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 ghc'
Comment 11 Roberto Zunino 2008-01-14 21:45:29 EST
Updated to testing as suggested, but still wrong paths:

$ ghc-pkg describe base | grep haddock
haddock-interfaces: /usr/share/doc/ghc/libraries/base/base.haddock
haddock-html: /usr/share/doc/ghc/libraries/base

(should be ghc-6.8.2)

Also see #425974
Comment 12 Bryan O'Sullivan 2008-01-14 23:17:36 EST
What release of the package is installed now?  Should be ghc-6.8.2-8.fc8 which
has the correct paths.
Comment 13 Roberto Zunino 2008-01-15 23:12:48 EST
The release was the right one (ghc682-6.8.2-8.fc8), but my package.conf file was
not updated, likely because it's a conf file and was somehow modified (by
installing the gtk2hs RPM I guess).

S.5....T c /usr/lib64/ghc-6.8.2/package.conf

(BTW Cabal should really install one file per package, rather than put
everything in the global package.conf.)

Sorry for the spam.
Comment 14 Bryan O'Sullivan 2008-01-16 01:00:16 EST
Yes, package.conf is marked as noreplace, so that behaviour is expected.
Comment 15 Fedora Update System 2008-01-18 18:55:02 EST
ghc-6.8.2-8.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.