Bug#366184: libghc6-c2hs-dev: should pre-depend on ghc6
Op vr, 08-09-2006 te 16:31 -0700, schreef Andrew Pimlott: On Fri, Sep 08, 2006 at 05:05:11PM +0200, Arjan Oosting wrote: Sorry for the long delay and thanks for the extra information, it has been useful. Thanks to you for coming back to this--I meant to and just haven't gotten around to it. Well I procrastinating as it meant reading policy again and the package was removed anyway. :-) So because ghc6 is being upgraded /usr/bin/ghc-pkg is not available and the prerm script of libghc6-c2hs-dev fails. This can be fixed by calling /usr/lib/ghc-6.4.1/bin/ghc-pkg or calling /usr/bin/ghc-pkg6 in the prerm script. So the bug has been found. As libghc6-c2hs-dev is not available in unstable anymore I am closing this bug. Sounds good. I assume that the same issue would arise for any Debian package containing a GHC package, right? If so, I guess this should be advertised as the correct way to register/deregister GHC packages. I have downloaded all the source packages which build ghc packages [1] and looked at their postinst and prerm scripts and they are al doing fine. Most use dh_haskell anyway which generates correct postinst and prerm code as well. Greetings Arjan Oosting [1] for p in `grep-aptavail -P libghc6- -s Source | uniq -u | cut -f2 -d ` ; do apt-get -t unstable source $p || true ; done signature.asc Description: Dit berichtdeel is digitaal ondertekend
Bug#366184: libghc6-c2hs-dev: should pre-depend on ghc6
On Fri, Sep 08, 2006 at 05:05:11PM +0200, Arjan Oosting wrote: Sorry for the long delay and thanks for the extra information, it has been useful. Thanks to you for coming back to this--I meant to and just haven't gotten around to it. So because ghc6 is being upgraded /usr/bin/ghc-pkg is not available and the prerm script of libghc6-c2hs-dev fails. This can be fixed by calling /usr/lib/ghc-6.4.1/bin/ghc-pkg or calling /usr/bin/ghc-pkg6 in the prerm script. So the bug has been found. As libghc6-c2hs-dev is not available in unstable anymore I am closing this bug. Sounds good. I assume that the same issue would arise for any Debian package containing a GHC package, right? If so, I guess this should be advertised as the correct way to register/deregister GHC packages. Andrew -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#366184: libghc6-c2hs-dev: should pre-depend on ghc6
Forgive my delay On Fri, Jun 23, 2006 at 08:29:17PM +0200, Arjan Oosting wrote: This does not seem to be a bug in libghc6-c2hs-dev. When the postinst script of libghc6-c2hs-dev is called, all the Depends should already be configured and ghc-pkg should be available. I looked more closely at the logs I have. (I don't have the screen output, but thankfully there is now dpkg.log.) Actually, even my initial bug report had a clue I missed. It is not the postinst of libghc6-c2hs-dev that failed, it is the prerm. Here are the relevant excerpts of dpkg.log: 2006-05-05 14:51:42 upgrade ghc6 6.4.1-2 6.4.1-2.1 2006-05-05 14:51:42 status half-configured ghc6 6.4.1-2 2006-05-05 14:51:44 status unpacked ghc6 6.4.1-2 2006-05-05 14:51:44 status half-installed ghc6 6.4.1-2 2006-05-05 14:51:46 status half-installed ghc6 6.4.1-2 2006-05-05 14:51:48 status unpacked ghc6 6.4.1-2.1 2006-05-05 14:51:48 status unpacked ghc6 6.4.1-2.1 ... 2006-05-05 14:52:17 upgrade libghc6-c2hs-dev 0.13.6-4 0.13.6-4.1 2006-05-05 14:52:17 status half-configured libghc6-c2hs-dev 0.13.6-4 ... 2006-05-05 14:54:48 status unpacked ghc6 6.4.1-2.1 2006-05-05 14:54:48 status half-configured ghc6 6.4.1-2.1 2006-05-05 14:54:49 status installed ghc6 6.4.1-2.1 So the sequence was - ghc6.prerm, removing the ghc-pkg alternative. - unpack the new ghc6 - libghc6-c2hs-dev.prerm, failing to ghc-pkg unregister - ghc6.postinst, reinstalling the ghc-pkg alternative There were a few related packages involved, c2hs, ghc6-prof, ghc6-libsrc, but I don't think they matter. You probably encountered some circular dependency during your upgrade which was broken somewhere by apt and caused this. Maybe you have more information about the upgrade, so we can reassign the bug to the right package? Otherwise I will close the bug. I will append the aptitude log for this run so you can inspect the full graph. I don't know off hand how to tell if there was a circular dependency, but I don't think there was one involving ghc and c2hs. Andrew Aptitude 0.4.1: log report Fri, May 5 2006 14:49:36 -0700 IMPORTANT: this log only lists intended actions; actions which fail due to dpkg problems may not be completed. Will install 230 packages, and remove 0 packages. 858kB of disk space will be used === [INSTALL, DEPENDENCIES] gcj-4.1-base [INSTALL, DEPENDENCIES] libdevmapper1.02 [INSTALL, DEPENDENCIES] liblzo-dev [INSTALL, DEPENDENCIES] libvolume-id0 [INSTALL, DEPENDENCIES] postgresql-client-common [INSTALL, DEPENDENCIES] python-minimal [INSTALL] gnutls-bin [INSTALL] libatk1.0-data [INSTALL] libpaper-utils [INSTALL] libsasl2-modules [INSTALL] python2.3-iconvcodec [INSTALL] xorg [UPGRADE] alsa-base 1.0.10-3 - 1.0.11-1 [UPGRADE] alsa-utils 1.0.10-1 - 1.0.11-2 [UPGRADE] autoconf 2.59a-8 - 2.59a-9 [UPGRADE] base-files 3.1.11 - 3.1.12 [UPGRADE] bash 3.1-3 - 3.1-4 [UPGRADE] bash-doc 3.1-3 - 3.1-4 [UPGRADE] bin86 0.16.14-1.2 - 0.16.14-1.3 [UPGRADE] c2hs 0.13.6-4 - 0.13.6-4.1 [UPGRADE] console-common 0.7.55.1 - 0.7.58 [UPGRADE] console-data 20060311 - 20060421 [UPGRADE] console-tools 1:0.2.3dbs-60 - 1:0.2.3dbs-62 [UPGRADE] cpp-3.3 1:3.3.6-12 - 1:3.3.6-13 [UPGRADE] cron 3.0pl1-93 - 3.0pl1-94 [UPGRADE] darcs 1.0.5-3 - 1.0.6-1 [UPGRADE] dbus 0.61-4 - 0.61-5 [UPGRADE] dctrl-tools 2.7 - 2.9.0 [UPGRADE] debconf-utils 1.4.71 - 1.5.0 [UPGRADE] debhelper 5.0.24 - 5.0.34 [UPGRADE] dhcp3-client 3.0.3-7 - 3.0.3-8 [UPGRADE] dhcp3-common 3.0.3-7 - 3.0.3-8 [UPGRADE] dia 0.94.0-17.1 - 0.95.0-2 [UPGRADE] dia-common 0.94.0-17.1 - 0.95.0-2 [UPGRADE] dia-libs 0.94.0-17.1 - 0.95.0-2 [UPGRADE] dmidecode 2.8-1 - 2.8-2 [UPGRADE] doc-debian 3.1.2 - 3.1.3 [UPGRADE] docbook-dsssl 1.79-3 - 1.79-4 [UPGRADE] dpatch 2.0.18 - 2.0.19 [UPGRADE] dpkg 1.13.16 - 1.13.18 [UPGRADE] dpkg-dev 1.13.16 - 1.13.18 [UPGRADE] e2fslibs 1.38+1.39-WIP-2005.12.31-1 - 1.38+1.39-WIP-2006.04.09-1 [UPGRADE] e2fsprogs 1.38+1.39-WIP-2005.12.31-1 - 1.38+1.39-WIP-2006.04.09-1 [UPGRADE] exim4-base 4.60-4 - 4.62-1 [UPGRADE] exim4-config 4.60-4 - 4.62-1 [UPGRADE] exim4-daemon-light 4.60-4 - 4.62-1 [UPGRADE] exuberant-ctags 1:5.5.4-1 - 1:5.5.4-2 [UPGRADE] fakeroot 1.5.7 - 1.5.8 [UPGRADE] fastjar 1:4.0.3-1 - 1:4.1.0-2 [UPGRADE] fetchmail 6.3.2-3 - 6.3.4-1 [UPGRADE] file 4.15-2 - 4.17-1 [UPGRADE] findutils 4.2.27-1 - 4.2.27-2 [UPGRADE] firefox 1.5.dfsg+1.5.0.1-4 - 1.5.dfsg+1.5.0.2-3 [UPGRADE] flex 2.5.33-2 - 2.5.33-3 [UPGRADE] foomatic-db 20060113-1 - 20060408-1 [UPGRADE] foomatic-db-engine 3.0.2-20060113-1 - 3.0.2-20060318-1 [UPGRADE] foomatic-filters 3.0.2-20060113-1 - 3.0.2-20060318-2 [UPGRADE] g++ 4:4.0.2-2 - 4:4.0.3-3 [UPGRADE] g++-3.3 1:3.3.6-12 - 1:3.3.6-13 [UPGRADE] gaim 1:1.5.0+1.5.1cvs20051015-2 - 1:1.5.0+1.5.1cvs20051015-3 [UPGRADE] gaim-data 1:1.5.0+1.5.1cvs20051015-2 - 1:1.5.0+1.5.1cvs20051015-3 [UPGRADE] gcc 4:4.0.2-2 - 4:4.0.3-3 [UPGRADE] gcc-3.3 1:3.3.6-12 - 1:3.3.6-13 [UPGRADE] gcc-3.3-base 1:3.3.6-12 - 1:3.3.6-13 [UPGRADE] gcj 4:4.0.2-2 -
Bug#366184: libghc6-c2hs-dev: should pre-depend on ghc6
I can reproduce this problem. I used packages from snapshot.debian.net: http://snapshot.debian.net/archive/2006/03/27/debian/pool/main/g/ghc6/ghc6_6.4.1-2_i386.deb http://snapshot.debian.net/archive/2006/03/27/debian/pool/main/g/ghc6/ghc6_6.4.1-2.1_i386.deb http://snapshot.debian.net/archive/2006/04/17/debian/pool/main/c/c2hs/libghc6-c2hs-dev_0.13.6-4_i386.deb http://snapshot.debian.net/archive/2006/04/17/debian/pool/main/c/c2hs/libghc6-c2hs-dev_0.13.6-4.1_i386.deb The first step is downgrading to ghc6_6.4.1-2 and libghc6-c2hs-dev_0.13.6-4. The latter seems quite broken; I had to create a symlink ln -s /usr/lib/libghc6-c2hs-dev /usr/lib/c2hs-0.13.6 to convince it to install. I also got a warning from ghc-pkg (can't find GHCi lib c2hs.o), but it doesn't seem relevant. Anyhow, once I had those two versions installed, I tried to upgrade: # dpkg --install ghc6_6.4.1-2.1_i386.deb libghc6-c2hs-dev_0.13.6-4.1_i386.deb (Reading database ... 102699 files and directories currently installed.) Preparing to replace ghc6 6.4.1-2 (using ghc6_6.4.1-2.1_i386.deb) ... Unpacking replacement ghc6 ... Preparing to replace libghc6-c2hs-dev 0.13.6-4 (using libghc6-c2hs-dev_0.13.6-4.1_i386.deb) ... /var/lib/dpkg/info/libghc6-c2hs-dev.prerm: line 22: ghc-pkg: command 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: line 25: ghc-pkg: command not found dpkg: error processing libghc6-c2hs-dev_0.13.6-4.1_i386.deb (--install): subprocess new pre-removal script returned error exit status 127 /var/lib/dpkg/info/libghc6-c2hs-dev.postinst: line 26: ghc-pkg: command not found dpkg: error while cleaning up: subprocess post-installation script returned error exit status 127 Setting up ghc6 (6.4.1-2.1) ... Errors were encountered while processing: libghc6-c2hs-dev_0.13.6-4.1_i386.deb dpkg.log: 2006-07-04 12:54:10 upgrade ghc6 6.4.1-2 6.4.1-2.1 2006-07-04 12:54:10 status half-configured ghc6 6.4.1-2 2006-07-04 12:54:11 status unpacked ghc6 6.4.1-2 2006-07-04 12:54:11 status half-installed ghc6 6.4.1-2 2006-07-04 12:54:14 status half-installed ghc6 6.4.1-2 2006-07-04 12:54:16 status unpacked ghc6 6.4.1-2.1 2006-07-04 12:54:16 status unpacked ghc6 6.4.1-2.1 2006-07-04 12:54:16 upgrade libghc6-c2hs-dev 0.13.6-4 0.13.6-4.1 2006-07-04 12:54:16 status half-configured libghc6-c2hs-dev 0.13.6-4 2006-07-04 12:54:16 status unpacked ghc6 6.4.1-2.1 2006-07-04 12:54:16 status half-configured ghc6 6.4.1-2.1 2006-07-04 12:54:17 status installed ghc6 6.4.1-2.1 This shows that dpkg is happy to deconfigure ghc6 (and leave it deconfigured) before deconfiguring libghc6-c2hs-dev. My dpkg is 1.13.21. By the way, if I reverse the order of the packages on the dpkg --install line, it works fine because dpkg deconfigures libghc6-c2hs-dev first. So it is currently a problem for a package to assume that a Depended-upon package will be configured during prerm. I note that the policy excerpt already cited in this bug is ambiguous: The Depends field should also be used if the postinst, prerm or postrm scripts require the package to be present in order to run. Note, however, that the postrm cannot rely on any non-essential packages to be present during the purge phase. It isn't clear whether present means configured. Another excerpt from the same section: A Depends field takes effect _only_ when a package is to be configured. It isn't clear whether configured means (de)configured. Andrew -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#366184: libghc6-c2hs-dev: should pre-depend on ghc6
package libghc6-c2hs-dev tags 366184 moreinfo thanks Hi Andrew, This does not seem to be a bug in libghc6-c2hs-dev. When the postinst script of libghc6-c2hs-dev is called, all the Depends should already be configured and ghc-pkg should be available. You probably encountered some circular dependency during your upgrade which was broken somewhere by apt and caused this. Maybe you have more information about the upgrade, so we can reassign the bug to the right package? Otherwise I will close the bug. Greetings Arjan signature.asc Description: Dit berichtdeel is digitaal ondertekend
Bug#366184: libghc6-c2hs-dev: should pre-depend on ghc6
Package: libghc6-c2hs-dev Version: 0.13.6-4 Severity: important I just did a big upgrade, and libghc6-c2hs-dev failed: Preparing to replace libghc6-c2hs-dev 0.13.6-4 (using .../libghc6-c2hs-dev_0.13.6-4.1_i386.deb) ... /var/lib/dpkg/info/libghc6-c2hs-dev.prerm: line 22: ghc-pkg: command 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: line 25: ghc-pkg: command not found dpkg: error processing /var/cache/apt/archives/libghc6-c2hs-dev_0.13.6-4.1_i386.deb (--unpack): subprocess new pre-removal script returned error exit status 127 /var/lib/dpkg/info/libghc6-c2hs-dev.postinst: line 26: ghc-pkg: command not found dpkg: error while cleaning up: subprocess post-installation script returned error exit status 127 ghc-pkg is not available until ghc6 is finished configuring. Thus, I think that libghc6-c2hs-dev should pre-depend on ghc6. Andrew -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (800, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.15-1-686 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages libghc6-c2hs-dev depends on: ii ghc6 6.4.1-2.1 GHC - the Glasgow Haskell Compilat libghc6-c2hs-dev recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]