clone 455049 -1 retitle 455049 generated postinst should not generate GHCi libraries retitle -1 libghc6-hdbc-sqlite3-dev should ship GHCi library as regular file reassign -1 libghc6-hdbc-sqlite3-dev thanks
Op donderdag 01-05-2008 om 15:44 uur [tijdzone -0500], schreef John Goerzen: > reassign 455049 haskell-devscripts > thanks > > Hi Arjan, > > I have verified that the behavior documented here persists with the GHC 6.8 > version of hdbc-sqlite3 in sid; that is, a .so file is left on the disk > after purging. I think haskell-devscripts ought to handle removal of that. > Is that something you'd be willing to code up? > > -- John > Hi John, Sorry for the late reply. I have been quite busy at work and have had much time for Debian lately. The bug reported is the result of two seperate bugs in my opinion. Firstly the libghc6-hdbc-sqlite3-dev package does not ship the .o library needed for GHCi which it should do. Then the second bug is in haskell-devscripts where the postinst script generated by haskell-devscripts calls ghc-pkg with the "--auto-ghci-libs" argument, which generates the .o library, but the prerm script generated by haskell-devscripts does not remove this .o file on remove/purge. As I can not think of a case where you would want to use a library in GHCi but can not ship the .o file in the library package I would argue that every library package that should be used with GHCi should ship the .o file as a regular file in the .deb and not generate it during install. Thus there should be no need for the postinst script to call ghc-pkg with the "--auto-ghci-libs" argument. As such I think the bug in haskell-devscripts can most easily be fixed by removing the "--auto-ghci-libs" argument from the ghc-pkg call. haskell-devscripts already builds and installs the .o file in the library package, so most packages should not be affected by this change. But I don't want to add extra breakage to already semi-broken packages which use haskell-devscripts when the freeze of Lenny is a couple days away so I will probably change this after the release of Lenny. As for the first bug in libghc6-hdbc-sqlite3-dev. This package should ship the .o file but the "(MAKE) clean" after the "dh_haskell -a" in the debian/rules removes the .o file before the .deb is completely build. See the sequence of events below: [EMAIL PROTECTED]:/tmp/hdbc-sqlite3-1.1.4.0.0$ dh_haskell -a Generating meta-information... grep -s -v '^haskell:Depends=' debian/libghc6-hdbc-sqlite3-dev.substvars > debian/libghc6-hdbc-sqlite3-dev.substvars.new || true mv debian/libghc6-hdbc-sqlite3-dev.substvars.new debian/libghc6-hdbc-sqlite3-dev.substvars (grep -s -v haskell:Depends debian/libghc6-hdbc-sqlite3-dev.substvars; echo "haskell:Depends=ghc6 (>= 6.8.2)") > debian/libghc6-hdbc-sqlite3-dev.substvars.new mv debian/libghc6-hdbc-sqlite3-dev.substvars.new debian/libghc6-hdbc-sqlite3-dev.substvars (grep -s -v haskell:Depends debian/libghc6-hdbc-sqlite3-dev.substvars; echo "haskell:Depends=ghc6 (<< 6.8.2-999), ghc6 (>= 6.8.2)") > debian/libghc6-hdbc-sqlite3-dev.substvars.new mv debian/libghc6-hdbc-sqlite3-dev.substvars.new debian/libghc6-hdbc-sqlite3-dev.substvars ghc-6.8.2 /usr/lib/haskell-packages/ghc6/lib/HDBC-sqlite3-1.1.4.0 HDBC-sqlite3 1.1.4.0 echo "# Automatically added by dh_haskell_prep">> debian/libghc6-hdbc-sqlite3-dev.postinst.debhelper sed "s%#GHCVER#%ghc-6.8.2%;s%#PKGLIBDIR#%/usr/lib/haskell-packages/ghc6/lib/HDBC-sqlite3-1.1.4.0%;s%#CABALNAME#%HDBC-sqlite3%;s%#CABALVERSION#%1.1.4.0%" /usr/share/debhelper/autoscripts/postinst-ghc >> debian/libghc6-hdbc-sqlite3-dev.postinst.debhelper echo '# End automatically added section' >> debian/libghc6-hdbc-sqlite3-dev.postinst.debhelper echo "# Automatically added by dh_haskell_prep">> debian/libghc6-hdbc-sqlite3-dev.prerm.debhelper sed "s%#GHCVER#%ghc-6.8.2%;s%#PKGLIBDIR#%/usr/lib/haskell-packages/ghc6/lib/HDBC-sqlite3-1.1.4.0%;s%#CABALNAME#%HDBC-sqlite3%;s%#CABALVERSION#%1.1.4.0%" /usr/share/debhelper/autoscripts/prerm-ghc >> debian/libghc6-hdbc-sqlite3-dev.prerm.debhelper echo '# End automatically added section' >> debian/libghc6-hdbc-sqlite3-dev.prerm.debhelper grep -s -v '^haskell:Depends=' debian/libhugs-hdbc-sqlite3.substvars > debian/libhugs-hdbc-sqlite3.substvars.new || true mv debian/libhugs-hdbc-sqlite3.substvars.new debian/libhugs-hdbc-sqlite3.substvars (grep -s -v haskell:Depends debian/libhugs-hdbc-sqlite3.substvars; echo "haskell:Depends=hugs (>= 98.200609.21)") > debian/libhugs-hdbc-sqlite3.substvars.new mv debian/libhugs-hdbc-sqlite3.substvars.new debian/libhugs-hdbc-sqlite3.substvars Building setup... "ghc6 -package Cabal Setup.lhs -o setup" ****************************************** CONFIGURING libghc6-hdbc-sqlite3-dev FOR ghc6 ****************************************** ./setup clean cleaning... lndir /tmp/hdbc-sqlite3-1.1.4.0.0/Database debian/tmp/build/libghc6-hdbc-sqlite3-dev//Database /tmp/hdbc-sqlite3-1.1.4.0.0/Database/HDBC: /tmp/hdbc-sqlite3-1.1.4.0.0/Database/HDBC/Sqlite3: lndir /tmp/hdbc-sqlite3-1.1.4.0.0/testsrc debian/tmp/build/libghc6-hdbc-sqlite3-dev//testsrc ./setup configure --prefix=/usr/lib/haskell-packages/ghc6 --with-compiler=/usr/bin/ghc6 Configuring HDBC-sqlite3-1.1.4.0... ****************************************** CONFIGURING libhugs-hdbc-sqlite3 FOR hugs ****************************************** ./setup clean cleaning... lndir /tmp/hdbc-sqlite3-1.1.4.0.0/Database debian/tmp/build/libhugs-hdbc-sqlite3//Database /tmp/hdbc-sqlite3-1.1.4.0.0/Database/HDBC: /tmp/hdbc-sqlite3-1.1.4.0.0/Database/HDBC/Sqlite3: lndir /tmp/hdbc-sqlite3-1.1.4.0.0/testsrc debian/tmp/build/libhugs-hdbc-sqlite3//testsrc ./setup configure --hugs --prefix=/usr Configuring HDBC-sqlite3-1.1.4.0... ****************************************** BUILDING libghc6-hdbc-sqlite3-dev FOR ghc6 ****************************************** ./setup build Preprocessing library HDBC-sqlite3-1.1.4.0... Building HDBC-sqlite3-1.1.4.0... [1 of 7] Compiling Database.HDBC.Sqlite3.Consts ( dist/build/Database/HDBC/Sqlite3/Consts.hs, dist/build/Database/HDBC/Sqlite3/Consts.o ) [2 of 7] Compiling Database.HDBC.Sqlite3.Types ( Database/HDBC/Sqlite3/Types.hs, dist/build/Database/HDBC/Sqlite3/Types.o ) [3 of 7] Compiling Database.HDBC.Sqlite3.Utils ( dist/build/Database/HDBC/Sqlite3/Utils.hs, dist/build/Database/HDBC/Sqlite3/Utils.o ) [4 of 7] Compiling Database.HDBC.Sqlite3.Statement ( dist/build/Database/HDBC/Sqlite3/Statement.hs, dist/build/Database/HDBC/Sqlite3/Statement.o ) [5 of 7] Compiling Database.HDBC.Sqlite3.ConnectionImpl ( Database/HDBC/Sqlite3/ConnectionImpl.hs, dist/build/Database/HDBC/Sqlite3/ConnectionImpl.o ) [6 of 7] Compiling Database.HDBC.Sqlite3.Connection ( Database/HDBC/Sqlite3/Connection.hs, dist/build/Database/HDBC/Sqlite3/Connection.o ) [7 of 7] Compiling Database.HDBC.Sqlite3 ( Database/HDBC/Sqlite3.hs, dist/build/Database/HDBC/Sqlite3.o ) /usr/bin/ar: creating dist/build/libHSHDBC-sqlite3-1.1.4.0.a ****************************************** BUILDING libhugs-hdbc-sqlite3 FOR hugs ****************************************** ./setup build Preprocessing library HDBC-sqlite3-1.1.4.0... Building HDBC-sqlite3-1.1.4.0... Compiling FFI stubs dist/scratch/Database/HDBC/Sqlite3/Connection.c: In function ‘hugsprim_sqlite3_libversion_4’: dist/scratch/Database/HDBC/Sqlite3/Connection.c:16: warning: assignment discards qualifiers from pointer target type dist/scratch/Database/HDBC/Sqlite3/Statement.c: In function ‘hugsprim_sqlite3_column_text_9’: dist/scratch/Database/HDBC/Sqlite3/Statement.c:107: warning: assignment discards qualifiers from pointer target type dist/scratch/Database/HDBC/Sqlite3/Statement.c: In function ‘hugsprim_sqlite3_column_name_7’: dist/scratch/Database/HDBC/Sqlite3/Statement.c:141: warning: assignment discards qualifiers from pointer target type dist/scratch/Database/HDBC/Sqlite3/Utils.c: In function ‘hugsprim_sqlite3_errmsg_0’: dist/scratch/Database/HDBC/Sqlite3/Utils.c:19: warning: assignment discards qualifiers from pointer target type ****************************************** INSTALLING libghc6-hdbc-sqlite3-dev FOR ghc6 ****************************************** install -d /tmp/hdbc-sqlite3-1.1.4.0.0/debian/libghc6-hdbc-sqlite3-dev/usr/lib/haskell-packages/ghc6 ./setup copy --destdir=/tmp/hdbc-sqlite3-1.1.4.0.0/debian/libghc6-hdbc-sqlite3-dev Installing: /tmp/hdbc-sqlite3-1.1.4.0.0/debian/libghc6-hdbc-sqlite3-dev/usr/lib/haskell-packages/ghc6/lib/HDBC-sqlite3-1.1.4.0/ghc-6.8.2 rm -rf /tmp/hdbc-sqlite3-1.1.4.0.0/debian/libghc6-hdbc-sqlite3-dev/usr/lib/haskell-packages/ghc6/share/HDBC-sqlite3-1.1.4.0/doc/ rm -rf /tmp/hdbc-sqlite3-1.1.4.0.0/debian/libghc6-hdbc-sqlite3-dev/usr/lib/haskell-packages/ghc6/share/doc/HDBC-sqlite3-1.1.4.0/ rmdir /tmp/hdbc-sqlite3-1.1.4.0.0/debian/libghc6-hdbc-sqlite3-dev/usr/lib/haskell-packages/ghc6/share/doc rmdir /tmp/hdbc-sqlite3-1.1.4.0.0/debian/libghc6-hdbc-sqlite3-dev/usr/lib/haskell-packages/ghc6/share ./setup register --gen-pkg-config Writing package registration file: HDBC-sqlite3-1.1.4.0.conf for HDBC-sqlite3-1.1.4.0... ****************************************** INSTALLING libhugs-hdbc-sqlite3 FOR hugs ****************************************** install -d /tmp/hdbc-sqlite3-1.1.4.0.0/debian/libhugs-hdbc-sqlite3/usr/lib/hugs/packages/HDBC-sqlite3 ./setup copy --destdir=/tmp/hdbc-sqlite3-1.1.4.0.0/debian/libhugs-hdbc-sqlite3 Installing: /tmp/hdbc-sqlite3-1.1.4.0.0/debian/libhugs-hdbc-sqlite3/usr/lib/hugs/packages/HDBC-sqlite3 rm -f /tmp/hdbc-sqlite3-1.1.4.0.0/debian/libhugs-hdbc-sqlite3/usr/share/doc/HDBC-sqlite3-1.1.4.0/LICENSE [EMAIL PROTECTED]:/tmp/hdbc-sqlite3-1.1.4.0.0$ ls debian/libghc6-hdbc-sqlite3-dev/usr/lib/haskell-packages/ghc6/lib/HDBC-sqlite3-1.1.4.0/ghc-6.8.2/ Database HSHDBC-sqlite3-1.1.4.0.o libHSHDBC-sqlite3-1.1.4.0.a [EMAIL PROTECTED]:/tmp/hdbc-sqlite3-1.1.4.0.0$ make clean ./setup clean cleaning... rm -rf html `find . -name "*.o"` `find . -name "*.hi" | grep -v debian` \ `find . -name "*~" | grep -v debian` *.a setup dist testsrc/runtests \ local-pkg doctmp rm -rf testtmp/* testtmp* So here the Makefile should be changed a little and then the libghc6-hdbc-sqlite3-dev package whould ship with .o file needed for GHCi (see patch below) Greetings Arjan Oosting diff -Nru hdbc-sqlite3-1.1.4.0.0/debian/changelog hdbc-sqlite3-1.1.4.0.0+nmu1/debian/changelog --- hdbc-sqlite3-1.1.4.0.0/debian/changelog 2008-01-16 16:47:54.000000000 +0100 +++ hdbc-sqlite3-1.1.4.0.0+nmu1/debian/changelog 2008-07-19 22:01:03.000000000 +0200 @@ -1,3 +1,12 @@ +hdbc-sqlite3 (1.1.4.0.0+nmu1) unstable; urgency=low + + * Non-maintainer upload. + * Makefile: + - Don't remove .o files from the debian directory as this causes + a missing file in the libghc6-hdbc-sqlite3-dev package. + + -- Arjan Oosting <[EMAIL PROTECTED]> Sat, 19 Jul 2008 21:59:45 +0200 + hdbc-sqlite3 (1.1.4.0.0) unstable; urgency=low * Updated for GHC 6.8 diff -Nru hdbc-sqlite3-1.1.4.0.0/Makefile hdbc-sqlite3-1.1.4.0.0+nmu1/Makefile --- hdbc-sqlite3-1.1.4.0.0/Makefile 2008-01-16 16:51:05.000000000 +0100 +++ hdbc-sqlite3-1.1.4.0.0+nmu1/Makefile 2008-07-19 22:01:41.000000000 +0200 @@ -30,7 +30,7 @@ clean: -./setup clean - -rm -rf html `find . -name "*.o"` `find . -name "*.hi" | grep -v debian` \ + -rm -rf html `find . -name "*.o" | grep -v debian` `find . -name "*.hi" | grep -v debian` \ `find . -name "*~" | grep -v debian` *.a setup dist testsrc/runtests \ local-pkg doctmp -rm -rf testtmp/* testtmp*
signature.asc
Description: Dit berichtdeel is digitaal ondertekend