Package INSTALL scriptlets do not generate a working haddock index (gen_contents_index broken)

The /usr/share/doc/ghc/html/libraries/gen_contents_index script is broken and causes haddock to emit broken links in the resulting documentation index for the local ghc pkg tree. Here's the fix: - NAME_VERSION=`echo "$HADDOCK_FILE" | sed 's#/.*##'` - HADDOCK_ARG="--read-interface=${NAME_VERSION},$HADDOCK_FILE" + HADDOCK_ARG="--read-interface=$(dirname $HADDOCK_FILE),$HADDOCK_FILE" The eager match on sed causes it to strip all but the first component of the package documentation path. Presumably this is broken upstream and needs to be fixed by them, but I'd like to confirm it's not caused by us before I pester the ghc-dev list. Matt

On Sun, Dec 2, 2012 at 10:17 PM, Matthew Cox
The /usr/share/doc/ghc/html/libraries/gen_contents_index script is broken and causes haddock to emit broken links in the resulting documentation index for the local ghc pkg tree. Here's the fix:
- NAME_VERSION=`echo "$HADDOCK_FILE" | sed 's#/.*##'` - HADDOCK_ARG="--read-interface=${NAME_VERSION},$HADDOCK_FILE" + HADDOCK_ARG="--read-interface=$(dirname $HADDOCK_FILE),$HADDOCK_FILE"
The eager match on sed causes it to strip all but the first component of the package documentation path.
Presumably this is broken upstream and needs to be fixed by them, but I'd like to confirm it's not caused by us before I pester the ghc-dev list.
In [haskell] we make one change to that particular script: https://github.com/archhaskell/habs/blob/master/ghc/silence-gen_contents_ind... In [extra] they make no changes to that script, as far as I can see: https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/g... /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus
participants (2)
-
Magnus Therning
-
Matthew Cox