tags 512063 + patch
thanks

Hi,

I created a patch for this, it is attached. With this, I can build (for
example) a haskell-string-utf8 that is installable. dpkg also handles
upgrading from a broken version of haskell-string-utf8, by trying the
prerm from the new package.

Arjian, are you handling this, or should this be NMUed?

Greetings,
Joachim


-- 
Joachim "nomeata" Breitner
Debian Developer
  nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
diff -Nru haskell-devscripts-0.6.14/debian/changelog haskell-devscripts-0.6.14.nomeata.1/debian/changelog
--- haskell-devscripts-0.6.14/debian/changelog	2008-10-13 00:43:52.000000000 +0200
+++ haskell-devscripts-0.6.14.nomeata.1/debian/changelog	2009-01-17 13:25:25.000000000 +0100
@@ -1,3 +1,11 @@
+haskell-devscripts (0.6.14.nomeata.1) UNRELEASED; urgency=low
+
+  * Fix "dh_haskell_prep generates postinsts that fail with ghc6
+    6.8.2dfsg1-1" by looking at the contents of the ghc6 package, instead
+    extracting the version from the package version (Closes: #512063)
+
+ -- Joachim Breitner <nome...@debian.org>  Sat, 17 Jan 2009 13:24:51 +0100
+
 haskell-devscripts (0.6.14) unstable; urgency=low
 
   * Handle multiple older versions in postinst-ghc template. 
diff -Nru haskell-devscripts-0.6.14/Dh_Haskell.pm haskell-devscripts-0.6.14.nomeata.1/Dh_Haskell.pm
--- haskell-devscripts-0.6.14/Dh_Haskell.pm	2008-07-20 01:39:30.000000000 +0200
+++ haskell-devscripts-0.6.14.nomeata.1/Dh_Haskell.pm	2009-01-17 13:30:23.000000000 +0100
@@ -29,7 +29,7 @@
 	     &dev_name &type_of_package
 	     &version_of_debpkg &version_of_type &upstream_version
 	     &profiling_name &getcabalname &getcabalversion &getcabalnameversion
-	     &getcabalbasepath &getcabalpkglibpath &getcabalpkgsharepath
+	     &getcabalbasepath &getcabalpkglibpath &getcabalpkgsharepath &getghcversion
 	     );
 
 sub builddir {
@@ -151,4 +151,17 @@
     return getcabalbasepath($pkgtype) . "/share/" . getcabalnameversion();
 }
 
+sub getghcversion {
+    open FILES, "dpkg -L ghc6 |";
+    my $retval;
+    for (<FILES>) {
+	chomp;
+	if (m!^/usr/lib/(ghc-[^/]+)$!) {
+	    $retval = $1;
+	}
+    }
+    close FILES;
+    return $retval;
+}
+
 1
diff -Nru haskell-devscripts-0.6.14/dh_haskell_prep haskell-devscripts-0.6.14.nomeata.1/dh_haskell_prep
--- haskell-devscripts-0.6.14/dh_haskell_prep	2008-03-22 21:28:43.000000000 +0100
+++ haskell-devscripts-0.6.14.nomeata.1/dh_haskell_prep	2009-01-17 13:24:16.000000000 +0100
@@ -48,7 +48,7 @@
 	    # add postinst/prerm scripts
 	    if ($pkgtype eq "ghc6") {
 		# Build scripts
-		my $ghcver = "ghc-" . upstream_version(version_of_type($pkgtype));
+		my $ghcver = getghcversion();
 		my $pkglibdir = getcabalpkglibpath($pkgtype);
 		my $cabalname = getcabalname();
 		my $cabalversion = getcabalversion();

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to