[Git][haskell-team/haskell-devscripts][master] Fix bug where ${CABAL_PACKAGE}.cabal may not exist.

Ilias Tsitsimpis (@iliastsi) gitlab at salsa.debian.org
Mon Jul 4 15:18:31 BST 2022



Ilias Tsitsimpis pushed to branch master at Debian Haskell Group / haskell-devscripts


Commits:
a551d4c1 by Ilias Tsitsimpis at 2022-07-04T17:15:28+03:00
Fix bug where ${CABAL_PACKAGE}.cabal may not exist.

The CABAL_PACKAGE environment variable holds the Debianized name of the
Haskell package (e.g., for the X11-xft Haskell package, CABAL_PACKAGE
will be 'x11-xft').

This means that ${CABAL_PACKAGE}.cabal may not exist. Try
glob("*.cabal") instead.

- - - - -


2 changed files:

- debian/changelog
- lib/Debian/Debhelper/Buildsystem/Haskell/Recipes.pm


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+haskell-devscripts (0.16.22) unstable; urgency=medium
+
+  * Fix bug where ${CABAL_PACKAGE}.cabal may not exist.
+
+ -- Ilias Tsitsimpis <iliastsi at debian.org>  Mon, 04 Jul 2022 17:01:34 +0300
+
 haskell-devscripts (0.16.21) unstable; urgency=medium
 
   * Work around old timestamps in Hackage tarballs.


=====================================
lib/Debian/Debhelper/Buildsystem/Haskell/Recipes.pm
=====================================
@@ -511,7 +511,7 @@ sub make_setup_recipe {
 # standardized Setup.hs file. For more information, see
 # https://www.haskell.org/cabal/users-guide/developing-packages.html#pkg-field-build-type
 
-    my $cabal_path = "$ENV{CABAL_PACKAGE}.cabal";
+    my $cabal_path = (glob("*.cabal"))[0];
     my $cabal_contents = path($cabal_path)->slurp_utf8;
 
     die encode_utf8("No cabal-version in $cabal_path")



View it on GitLab: https://salsa.debian.org/haskell-team/haskell-devscripts/-/commit/a551d4c1c2e18cd225732c8788f97e9bbe4d36d2

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/haskell-devscripts/-/commit/a551d4c1c2e18cd225732c8788f97e9bbe4d36d2
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20220704/9fa49817/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list