Package: ghc
Version: 7.0.3-1
Severity: normal
Tags: patch

ghc 7.0.3-1 lacks man page for runghc. It's not a big problem for using
package, but this causes package configuration error.

I found cause of problem, it is in debian/rules file: runghc man-page is
installed if test on 213 line is passed "if test -e
debian/tmp/usr/bin/ghci-$(ProjectVersion); then BLA-BLA-BLA". But
debian/tmp/usr/bin/ghci-$(ProjectVersion) is not a file, but a soft-link
created at lines 182-183 and pointing to /usr/bin/ghci-$(ProjectVersion). It is
a good soft-link for installation purposes, but, as usually ghc is created by
previous version of ghc, this is a dead soft-link, so "test -e" fails for this
link and no man-page for runghc is installed. So IMO there are two options
a) quickfix is to rebuild ghc 7.0.3 using ghc 7.0.3
b) change "test -e" to "test -h", as debian/tmp/usr/bin/ghci-$(ProjectVersion)
is a soft-link created by debian/rules somewhat earlier

I'm not using debian, but trying convert some debian packages for ubuntu. But I
re-checked that debian/sid ghc package version 7.0.3-1 doesn't have runghc man
page

I'm attaching a fix for this problem (variant b)

-- System Information:
Debian Release: squeeze/sid
  APT prefers maverick-updates
  APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500,
'maverick')
Architecture: i386 (i686)

Kernel: Linux 2.6.35-28-generic-pae (SMP w/2 CPU cores)
diff -Naur debian_old//rules debian/rules
--- debian_old//rules	2011-04-09 15:36:49.000000000 +0400
+++ debian/rules	2011-05-06 00:47:53.918104000 +0400
@@ -210,7 +210,7 @@
 	# manpages
 	rm -f debian/*.1
 	echo ".so man1/ghc.1" > debian/ghc-$(ProjectVersion).1
-	if test -e debian/tmp/usr/bin/ghci-$(ProjectVersion); then \
+	if test -h debian/tmp/usr/bin/ghci-$(ProjectVersion); then \
 	    echo ".so man1/ghc.1" > debian/ghci.1 ;\
 	    echo ".so man1/ghc.1" > debian/ghci-$(ProjectVersion).1 ;\
 	    cp debian/runghc.man debian/runghc.1 ; fi

Reply via email to