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

2006-05-15 Thread Arjan Oosting
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
configure|abort-upgrade|abort-remove|abort-deconfigure)
...
update-alternatives \
--install $execdir/ghc ghc $bindir/ghc 600 \
--slave $execdir/ghc-pkg ghc-pkg $bindir/ghc-pkg \
...
if [ ! -e $libdir/package.conf ]
then
cp $libdir/package.conf.shipped $libdir/package.conf
fi


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
two.

I would like to hear your opinions.

Greetings Arjan

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


signature.asc
Description: Dit berichtdeel is digitaal ondertekend


Bug#366184: [Debian-haskell] libghc6-FOO-dev packages should Pre-Depends on ghc6

2006-05-17 Thread Arjan Oosting
Op di, 16-05-2006 te 22:21 +0300, schreef Antti-Juhani Kaijanaho:
> Arjan Oosting wrote:
> > To solve this we either Pre-Depends on ghc6 
> 
> No, that is the wrong solution.  Pre-Depends are mainly used in 
> Essential: yes packages; it is wrong in almost all other cases.
> 
> This bug seems strange, though.  Since libghc6-c2hs-dev depends on ghc6, 
> the latter should be configured when libghc6-c2hs-dev is being 
> (de)configured.  I suspect that libghc6-c2hs-dev was not the only 
> package involved in the upgrade, yet the bug logs don't show the whole 
> upgrade; that we are not seeing the whole picture here.

Indeed you are right and I am wrong :)

From policy: 

Depends

This declares an absolute dependency. A package will not be
configured unless all of the packages listed in its Depends
field have been correctly configured.

The Depends field should be used if the depended-on package is
required for the depending package to provide a significant
amount of functionality.

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.

So indeed the Depends relationship is right and it should NOT be a
pre-depends. Sorry for the noise.

Greetings Arjan


signature.asc
Description: Dit berichtdeel is digitaal ondertekend


Bug#366184: libghc6-c2hs-dev: should pre-depend on ghc6

2006-06-23 Thread Arjan Oosting
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#376682: libghc6-c2hs-dev: not installable on unstable

2006-07-04 Thread Arjan Oosting
Hi,

Thanks for your bug report. 

I have upgraded c2hs to version 0.14.5 which no longer ships a library
for GHC 6. This means that libghc6-c2hs-dev will not be upgraded anymore
and will be removed from the archive soon. Until that time it will be
not installable.  

Greetings Arjan


signature.asc
Description: Dit berichtdeel is digitaal ondertekend


Bug#381815: Patch for haskelldb. Fixes an RC bug

2006-08-07 Thread Arjan Oosting
tag 381815 patch
thanks

Hi, I have prepared an update for haskelldb which fixes the RC bug and
some related issues (see changelog below). After a new version of
haskell-hsql is uploaded haskelldb can be uploaded with the attached
changes. 

As I am not a DD yet, I can not NMU haskell-hsql (I have supplied a
patch though) and can not upload haskelldb. So if someone is willing to
NMU haskell-hsql and upload haskelldb it would be nice.

Greetings Arjan

  * QA upload.
  * debian/control:
- Add a Section for the source package.
- Update build dependency on ghc6. (Closes: #381815)
- Add missing Depends on libghc6-hsql-mysql-dev,
  libghc6-hsql-odbc-dev, libghc6-hsql-postgresql-dev and
  libghc6-hsql-sqlite-dev needed to configure and use
  libghc6-haskelldb-dev.
- Make sure libghc6-haskell-dev depends on the version of
  libghc-hsql-dev it was build against by using the ${HSQL:Version}
  substitution variable.
- Add dctrl-tools to Build-Depends because grep-dctrl is used to
  determine the version of libghc6-hsql-dev.
- Bump Standards-Version. No changes needed.
   * debian/haskelldb.cabal:
- Add hsql-odbc, hsql-mysql, hsql-sqlite and hsql-postgresql to the
  Build-Depends as these modules are needed to build haskelldb and
  ghc6 (>= 6.4.2) will not make them available by default anymore.
- Remove Allow prefix from the needed extensions declarations.
  * debian/rules:
- Remove commented out dh_make template cruft.
- Touch configure-stamp at the end of the configure-stamp target.
- Do not ignore errors on clean.
- Generate the ${HSQL:Version} substitution variable.

diff -u haskelldb-0.9.cvs.601/debian/changelog haskelldb-0.9.cvs.601/debian/changelog
--- haskelldb-0.9.cvs.601/debian/changelog
+++ haskelldb-0.9.cvs.601/debian/changelog
@@ -1,3 +1,32 @@
+haskelldb (0.9.cvs.601-10) unstable; urgency=low
+
+  * QA upload.
+  * debian/control: 
+- Add a Section for the source package.
+- Update build dependency on ghc6. (Closes: #381815)
+- Add missing Depends on libghc6-hsql-mysql-dev,
+  libghc6-hsql-odbc-dev, libghc6-hsql-postgresql-dev and
+  libghc6-hsql-sqlite-dev needed to configure and use
+  libghc6-haskelldb-dev. 
+- Make sure libghc6-haskell-dev depends on the version of
+  libghc-hsql-dev it was build against by using the ${HSQL:Version}
+  substitution variable.
+- Add dctrl-tools to Build-Depends because grep-dctrl is used to
+  determine the version of libghc6-hsql-dev.
+- Bump Standards-Version. No changes needed.
+   * debian/haskelldb.cabal: 
+- Add hsql-odbc, hsql-mysql, hsql-sqlite and hsql-postgresql to the
+  Build-Depends as these modules are needed to build haskelldb and
+  ghc6 (>= 6.4.2) will not make them available by default anymore.
+- Remove Allow prefix from the needed extensions declarations.
+  * debian/rules:
+- Remove commented out dh_make template cruft.
+- Touch configure-stamp at the end of the configure-stamp target.
+- Do not ignore errors on clean.
+- Generate the ${HSQL:Version} substitution variable.
+
+ -- Arjan Oosting <[EMAIL PROTECTED]>  Mon,  7 Aug 2006 16:05:44 +0200
+
 haskelldb (0.9.cvs.601-9) unstable; urgency=medium
 
   * QA upload.
diff -u haskelldb-0.9.cvs.601/debian/control haskelldb-0.9.cvs.601/debian/control
--- haskelldb-0.9.cvs.601/debian/control
+++ haskelldb-0.9.cvs.601/debian/control
@@ -1,14 +1,15 @@
 Source: haskelldb
+Section: devel
 Priority: optional
 Maintainer: Debian QA Group <[EMAIL PROTECTED]>
-Build-Depends: debhelper (>= 4.0.0), ghc6 (>= 6.4.1), ghc6 (<< 6.4.1-999), haskell-devscripts (>= 0.5.6), libghc6-hsql-dev (>= 1.6-4), libghc6-hsql-mysql-dev, libghc6-hsql-odbc-dev, libghc6-hsql-postgresql-dev, libghc6-hsql-sqlite-dev
-Standards-Version: 3.6.2
+Build-Depends: dctrl-tools, debhelper (>= 4.0.0), ghc6 (>= 6.4.2), haskell-devscripts (>= 0.5.6), libghc6-hsql-dev (>= 1.6-4), libghc6-hsql-mysql-dev, libghc6-hsql-odbc-dev, libghc6-hsql-postgresql-dev, libghc6-hsql-sqlite-dev
+Standards-Version: 3.7.2
 
 Package: libghc6-haskelldb-dev
 Section: libdevel
 Architecture: any
 Suggests: haskelldb-bin
-Depends: libghc6-hsql-dev (>= 1.4-5), ${shlibs:Depends}, ${haskell:Depends}
+Depends: libghc6-hsql-dev (>= ${HSQL:Version}), libghc6-hsql-dev (<< ${HSQL:VERSION}++), libghc6-hsql-mysql-dev, libghc6-hsql-odbc-dev, libghc6-hsql-postgresql-dev, libghc6-hsql-sqlite-dev, ${shlibs:Depends}, ${haskell:Depends}
 Description: Haskell library for expressing database queries
  HaskellDB is a Haskell library for expressing database queries and
  operations in a type safe and declarative way. HaskellDB compiles a
diff -u haskelldb-0.9.cvs.601/debian/rules haskelldb-0.9.cvs.601/debian/rules
--- haskelldb-0.9.cvs.601/debian/rules
+++ haskelldb-0.9.cvs.601/debian/rules
@@ -9,9 +9,6 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOS

Bug#383533: libghc6-haskelldb-dev: curious version number in dependency

2006-08-24 Thread Arjan Oosting
tag 383533 patch
thanks

Hi Lars,

Thanks for your bug report. 

Op vr, 18-08-2006 te 00:39 +0300, schreef Lars Wirzenius:
> Package: libghc6-haskelldb-dev
> Version: 0.9.cvs.601-10
> 
> This version of the package has a dependency header that looks like this
> (in part):
> 
> Depends: libghc6-hsql-dev (>= 1.6), libghc6-hsql-dev (<< ++)
> 
> Although "++" seems to be strictly according to the syntax in Policy
> (even if it doesn't start with a digit), but I suspect it is not what is
> meant here.
It seems I made a typo in the debian/control file. I have fixed it now
(patch attached).

Marga, as you uploaded the last version of haskelldb for me, could you
upload this simple fix as well?

Greetings Arjan 

 
diff -u haskelldb-0.9.cvs.601/debian/changelog haskelldb-0.9.cvs.601/debian/changelog
--- haskelldb-0.9.cvs.601/debian/changelog
+++ haskelldb-0.9.cvs.601/debian/changelog
@@ -1,3 +1,11 @@
+haskelldb (0.9.cvs.601-11) unstable; urgency=low
+
+  * QA upload.
+  * debian/control: Fix typo in substitution variable which caused a
+    strange version number. (Closes: #383533)
+
+ -- Arjan Oosting <[EMAIL PROTECTED]>  Thu, 24 Aug 2006 13:49:53 +0200
+
 haskelldb (0.9.cvs.601-10) unstable; urgency=low
 
   * QA upload.
diff -u haskelldb-0.9.cvs.601/debian/control haskelldb-0.9.cvs.601/debian/control
--- haskelldb-0.9.cvs.601/debian/control
+++ haskelldb-0.9.cvs.601/debian/control
@@ -9,7 +9,7 @@
 Section: libdevel
 Architecture: any
 Suggests: haskelldb-bin
-Depends: libghc6-hsql-dev (>= ${HSQL:Version}), libghc6-hsql-dev (<< ${HSQL:VERSION}++), libghc6-hsql-mysql-dev, libghc6-hsql-odbc-dev, libghc6-hsql-postgresql-dev, libghc6-hsql-sqlite-dev, ${shlibs:Depends}, ${haskell:Depends}
+Depends: libghc6-hsql-dev (>= ${HSQL:Version}), libghc6-hsql-dev (<< ${HSQL:Version}+), libghc6-hsql-mysql-dev, libghc6-hsql-odbc-dev, libghc6-hsql-postgresql-dev, libghc6-hsql-sqlite-dev, ${shlibs:Depends}, ${haskell:Depends}
 Description: Haskell library for expressing database queries
  HaskellDB is a Haskell library for expressing database queries and
  operations in a type safe and declarative way. HaskellDB compiles a
diff -u haskelldb-0.9.cvs.601/debian/rules haskelldb-0.9.cvs.601/debian/rules
--- haskelldb-0.9.cvs.601/debian/rules
+++ haskelldb-0.9.cvs.601/debian/rules
@@ -44,7 +44,6 @@
 		src/Database/HaskellDB/GenericConnect.hs local-pkg \
 		DBDirect
 	dh_clean 
-	echo $(HSQL_VERSION)
 
 install: build
 	dh_testdir


signature.asc
Description: Dit berichtdeel is digitaal ondertekend


Bug#366184: libghc6-c2hs-dev: should pre-depend on ghc6

2006-09-08 Thread Arjan Oosting
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