Bug#850920: cabal-debian fails to detect GHC built-in packages
Kei Hibino
ex8k.hibino at gmail.com
Wed Jan 11 08:28:05 UTC 2017
Package: cabal-debian
Version: 4.33-4
Severity: important
Tags: patch
Dear Maintainer,
I made example sequence of cabal-debian like following.
Build-depends lines are generated by cabal-debian
like 'libghc-base-dev (<< 5)' and 'libghc-base-prof (<< 5)',
but 'base' is GHC built-in package which provided by
'ghc' debian package. So these version constraints are wrong.
It is not expected that version constraints are produced
with built-in packages.
----------
$ cabal unpack time-locale-compat-0.1.1.3
Unpacking to time-locale-compat-0.1.1.3/
$ cd time-locale-compat-0.1.1.3
$ tail -21 time-locale-compat.cabal | head -3
build-depends: base <5
$ cabal-debian
$ head -12 debian/control
Source: haskell-time-locale-compat
Maintainer: Debian Haskell Group <pkg-haskell-maintainers at lists.alioth.debian.org>
Priority: extra
Section: haskell
Build-Depends: debhelper (>= 10),
haskell-devscripts (>= 0.8),
cdbs,
ghc,
ghc-prof,
libghc-base-dev (<< 5),
libghc-base-prof (<< 5),
libghc-old-locale-dev,
----------
I made a small patch to fix this problem like following.
----------
--- cabal-debian-4.33.orig/src/Debian/Debianize/Bundled.hs 2016-10-07 04:13:42.000000000 +0900
+++ cabal-debian-4.33/src/Debian/Debianize/Bundled.hs 2017-01-09 21:43:40.231080418 +0900
@@ -105,7 +105,7 @@
lns = lines $ unsafePerformIO (chroot root (readProcess "dpkg" ["-L", unBinPkgName hcname] ""))
parseLib :: String -> Maybe PackageIdentifier
parseLib s =
- case s =~ ("(.*)-([0-9.]*)-(.*).conf$") :: (String, String, String, [String]) of
+ case s =~ ("(.*)-([0-9.]*)(-.*)?.conf$") :: (String, String, String, [String]) of
(_, _, _, [cabalName, ver, _sum]) ->
case parseVersion' ver of
Just v -> Just (PackageIdentifier (PackageName cabalName) v)
----------
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.8.0-2-amd64 (SMP w/40 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages cabal-debian depends on:
ii debhelper 10.2.3
ii libbz2-1.0 1.0.6-8
ii libc6 2.24-8
ii libffi6 3.2.1-6
ii libgmp10 2:6.1.2+dfsg-1
ii zlib1g 1:1.2.8.dfsg-4
Versions of packages cabal-debian recommends:
ii apt-file 3.1.3
cabal-debian suggests no packages.
-- no debconf information
More information about the Pkg-haskell-maintainers
mailing list