hardy -> intrepid upgrade issues

Bug #277233 reported by Michael Vogt
34
Affects Status Importance Assigned to Milestone
ghc6 (Ubuntu)
Won't Fix
High
Unassigned
Intrepid
Won't Fix
High
Unassigned
gtk2hs (Debian)
Fix Released
Unknown
gtk2hs (Ubuntu)
Fix Released
High
StefanPotyra
Intrepid
Fix Released
High
StefanPotyra

Bug Description

Binary package hint: ghc6

On a hardy to intrepid upgrade with the (randomly picked) "libghc6-gtk-dev" the upgrade fails. To reproduce:

1. get a clean hardy chroot (e.g. pbuilder)
2. apt-get install libghc6-gtk-dev update-manager-core
3. sudo do-release-upgrade -d
4. say "y" and wait for:

...
Preparing to replace libghc6-gtk-dev 0.9.12.1-1ubuntu2 (using .../libghc6-gtk-dev_0.9.13-2ubuntu1_i386.deb) ...
/var/lib/dpkg/info/libghc6-gtk-dev.prerm: 10: ghc-pkg: not found
dpkg: warning - old pre-removal script returned error exit status 127
dpkg - trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 10: ghc-pkg: not found
dpkg: error processing /var/cache/apt/archives/libghc6-gtk-dev_0.9.13-2ubuntu1_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
...

The reason for this seems to be that is managed via alternatives and when the postinst of libghc6-gtk-dev is run (new) ghc6 is unpacked but not configured yet and /usr/bin/ghc-pkg is not available. That makes the script fail and dpkg
gets really unhappy:

root@top:/# dpkg --configure -a
dpkg: error processing libghc6-glib-dev (--configure):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting configuration.

Related branches

Michael Vogt (mvo)
Changed in ghc6:
importance: Undecided → High
milestone: none → ubuntu-8.10
status: New → Triaged
Revision history for this message
Iain Lane (laney) wrote :

So I guess this is likely to be a problem with all Haskell libraries, when they are upgraded in the same run as ghc6?

Would making ghc6 a Pre-Depends of these libraries be appropriate? I have pinged kaol, the Debian maintainer of ghc for an opinion.

Revision history for this message
StefanPotyra (sistpoty) wrote :

Hi,

I believe this is a bug in gtk2hs: Unlike the other haskell libraries, which generate the maintainer scripts either via haskell-utils or haskell-devscripts, gtk2hs ships a it's own variant, which calls ghc-pkg (as managed via alternatives). In contrast, haskell-utils calls /usr/bin/ghc-pkg6, haskell-devscripts /usr/lib/ghc-6.8.2/bin/ghc-pkg, which are not managed via alternatives.

I'll upload a fixed gtk2hs soon, and will also file a bug in BTS about it.

Cheers,
   Stefan.

Changed in gtk2hs:
assignee: nobody → sistpoty
importance: Undecided → High
status: New → In Progress
Revision history for this message
StefanPotyra (sistpoty) wrote :

ghc6 -> won't fix: haskell libraries shall not use alternative managed files in maintainer scripts. (or would invalid be more appropriate *shrug*?)

Changed in ghc6:
status: Triaged → Won't Fix
status: Triaged → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk2hs - 0.9.13-2ubuntu2

---------------
gtk2hs (0.9.13-2ubuntu2) intrepid; urgency=low

  * debian/postinst.in, debian/prerm.in:
    Call /usr/bin/ghc-pkg6 instead of ghc-pkg, because the latter is
    managed in ghc6 via alternatives, and hence might not be available
    when gtk2hs's binary packges get configured. LP: #229489, #277233.
    Forwarded to Debian BTS via bug #501052.

 -- Stefan Potyra <email address hidden> Fri, 03 Oct 2008 18:34:53 +0200

Changed in gtk2hs:
status: In Progress → Fix Released
Revision history for this message
Ravindran K (ravindran-k) wrote :

Hi.. Some error while upgrading python-daap from hardy to Intrepid.. temporarily removed the package for progress further..

Revision history for this message
StefanPotyra (sistpoty) wrote :

@Ravindran: did you get an error with python-daap?

If so, can you file a separate one at https://launchpad.net/ubuntu/+source/python-daap/+bugs as this is unrelated to ghc6 and gtk2hs?

Thanks,
    Stefan.

Changed in gtk2hs:
status: Unknown → New
Changed in gtk2hs:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.