[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#366184: libghc6-FOO-dev packages should Pre-Depends on ghc6

Hi people,

I was just looking at the bugs of c2hs (I am thinking about adopting it)
and noticed bug 366184 [1]. The submitter did a big upgrade and the
configuration of libghc6-c2hs-dev failed because ghc-pkg was not
available yet because ghc6 was not yet configured. ghc-pkg is an
alternative configured in ghc6 postinst script.

My first though was just calling ghc-pkg6 which is available before ghc6
postinst script has run. But this also cause problems because the global
package configuration file of ghc6 is not available before ghc6 postinst
has run.  

Here are the relevant parts of the postinst from ghc6

case "$1" in
        update-alternatives \
            --install $execdir/ghc ghc $bindir/ghc 600 \
            --slave $execdir/ghc-pkg ghc-pkg $bindir/ghc-pkg \
        if [ ! -e $libdir/package.conf ]
            cp $libdir/package.conf.shipped $libdir/package.conf

What we see is that the ghc-pkg command is only available after ghc6
postinst and more importantly that the global package.conf is only
available after the postinst.
So every libghc6-FOO-dev package will have this bug and could cause
problem during upgrades. 

To solve this we either Pre-Depends on ghc6 so it is configured before
we install or we have to change the ghc6 package to support registering
packages right after unpacking. Personally I think Pre-Depends is the
way to go because we really need ghc6 configured before registering
libghc6-FOO-dev. It also is much easier to implement than alternative

I would like to hear your opinions.

Greetings Arjan

1) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=366184

Attachment: signature.asc
Description: Dit berichtdeel is digitaal ondertekend

Reply to: