Bug#823689: hlibrary.mk: libghc-*-doc.links files not respected

2016-05-09 Thread Sean Whitton
Sorry, that last patch was idiotic.  Here's a better one.

This needs to be tested against a package for which DEB_ENABLE_HOOGLE is
significant.  I'm not familiar with how Hoogle organises its files, but
perhaps you have such a package in mind.

-- 
Sean Whitton
From 326cc49097ffcf9b8ff7683fac3eb19eaba57368 Mon Sep 17 00:00:00 2001
From: Sean Whitton 
Date: Mon, 9 May 2016 18:47:22 -0700
Subject: [PATCH] Respect the user's debian/libghc-*-doc.links

---
 Dh_Haskell.sh| 6 +++---
 debian/changelog | 5 +
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 1c187fd..5887aa8 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -351,7 +351,6 @@ clean_recipe(){
 run rm -f configure-ghc-stamp configure-ghcjs-stamp build-ghc-stamp build-ghcjs-stamp build-hugs-stamp build-haddock-stamp
 run rm -rf debian/tmp-inst-ghc debian/tmp-inst-ghcjs
 run rm -f debian/extra-depends-ghc debian/extra-depends-ghcjs
-run rm -f debian/libghc-${CABAL_PACKAGE}-doc.links debian/libghcjs-${CABAL_PACKAGE}-doc.links
 if [ -f ${DEB_LINTIAN_OVERRIDES_FILE} ] ; then
   run sed -i '/binary-or-shlib-defines-rpath/ d' ${DEB_LINTIAN_OVERRIDES_FILE}
   run find ${DEB_LINTIAN_OVERRIDES_FILE} -empty -delete;
@@ -506,8 +505,9 @@ install_doc_recipe(){
 if [ "${DEB_ENABLE_HOOGLE}" = "yes" ]
 then
 run find debian/${PKG}/${htmldir} -name "*.txt" \
--printf "%p ${hoogle}/${PKG}.txt\n" >> debian/lib${hc}-${CABAL_PACKAGE}-doc.links
-run sed -i s,^debian/lib${hc}-${CABAL_PACKAGE}-doc,, debian/lib${hc}-${CABAL_PACKAGE}-doc.links
+-printf "%p ${hoogle}/${PKG}.txt" \
+| sed -i s,^debian/lib${hc}-${CABAL_PACKAGE}-doc,, debian/lib${hc}-${CABAL_PACKAGE}-doc.links \
+xargs dh_link
 fi
 run dh_haskell_depends -p${PKG}
 # PS4=$PS5
diff --git a/debian/changelog b/debian/changelog
index ef23643..f1b342f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,12 @@
 haskell-devscripts (0.10.2.4) UNRELEASED; urgency=medium
 
+  [ James McCoy ]
   * Fix “Unescaped left brace in regex” warnings in dh_haskell_blurbs.
 
+  [ Sean Whitton ]
+  * Respect user's debian/libghc-*-doc.links.  (Closes: #823689)
+Call dh_link rather than just overwriting debian/libghc-*-doc.links.
+
  -- James McCoy   Sun, 01 May 2016 11:01:02 -0400
 
 haskell-devscripts (0.10.2.3) unstable; urgency=medium
-- 
2.8.1



signature.asc
Description: PGP signature


Bug#823689: hlibrary.mk: libghc-*-doc.links files not respected

2016-05-09 Thread Sean Whitton
control: tag -1 +patch

Hello,

On Mon, May 09, 2016 at 04:59:33PM +0200, Joachim Breitner wrote:
> it runs
>     run rm -f debian/libghc-${CABAL_PACKAGE}-doc.links 
> debian/libghcjs-${CABAL_PACKAGE}-doc.links
> which in clean, which explains the problem, and writes to the file in
> the install target for the -dev package.
> 
>     if [ "${DEB_ENABLE_HOOGLE}" = "yes" ]
> then
> run find debian/${PKG}/${htmldir} -name "*.txt" \
> -printf "%p ${hoogle}/${PKG}.txt\n" >> 
> debian/lib${hc}-${CABAL_PACKAGE}-doc.links
> run sed -i s,^debian/lib${hc}-${CABAL_PACKAGE}-doc,, 
> debian/lib${hc}-${CABAL_PACKAGE}-doc.links
> fi
> 
> What is a saner way of doing this? Calling dh_link directly with all
> required links as arguments?

Thanks for tracking this down.  The attached patch seems to work (I've
tested it with my propellor package).

-- 
Sean Whitton
From a9c906582dbd572423059f9f1ea920d481e7fdec Mon Sep 17 00:00:00 2001
From: Sean Whitton 
Date: Mon, 9 May 2016 17:22:23 -0700
Subject: [PATCH] Respect the user's debian/libghc-*-doc.links

---
 Dh_Haskell.sh| 8 
 debian/changelog | 5 +
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 1c187fd..beaf372 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -351,7 +351,6 @@ clean_recipe(){
 run rm -f configure-ghc-stamp configure-ghcjs-stamp build-ghc-stamp build-ghcjs-stamp build-hugs-stamp build-haddock-stamp
 run rm -rf debian/tmp-inst-ghc debian/tmp-inst-ghcjs
 run rm -f debian/extra-depends-ghc debian/extra-depends-ghcjs
-run rm -f debian/libghc-${CABAL_PACKAGE}-doc.links debian/libghcjs-${CABAL_PACKAGE}-doc.links
 if [ -f ${DEB_LINTIAN_OVERRIDES_FILE} ] ; then
   run sed -i '/binary-or-shlib-defines-rpath/ d' ${DEB_LINTIAN_OVERRIDES_FILE}
   run find ${DEB_LINTIAN_OVERRIDES_FILE} -empty -delete;
@@ -505,9 +504,10 @@ install_doc_recipe(){
 run cp -r debian/tmp-inst-${hc}/${docdir}/*.haddock debian/${PKG}/${docdir}
 if [ "${DEB_ENABLE_HOOGLE}" = "yes" ]
 then
-run find debian/${PKG}/${htmldir} -name "*.txt" \
--printf "%p ${hoogle}/${PKG}.txt\n" >> debian/lib${hc}-${CABAL_PACKAGE}-doc.links
-run sed -i s,^debian/lib${hc}-${CABAL_PACKAGE}-doc,, debian/lib${hc}-${CABAL_PACKAGE}-doc.links
+links=`run find debian/${PKG}/${htmldir} -name "*.txt" \
+  -printf "%p ${hoogle}/${PKG}.txt\n" >> debian/lib${hc}-${CABAL_PACKAGE}-doc.links \
+  | sed -i s,^debian/lib${hc}-${CABAL_PACKAGE}-doc,, debian/lib${hc}-${CABAL_PACKAGE}-doc.links`
+run dh_link $links
 fi
 run dh_haskell_depends -p${PKG}
 # PS4=$PS5
diff --git a/debian/changelog b/debian/changelog
index ef23643..f1b342f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,12 @@
 haskell-devscripts (0.10.2.4) UNRELEASED; urgency=medium
 
+  [ James McCoy ]
   * Fix “Unescaped left brace in regex” warnings in dh_haskell_blurbs.
 
+  [ Sean Whitton ]
+  * Respect user's debian/libghc-*-doc.links.  (Closes: #823689)
+Call dh_link rather than just overwriting debian/libghc-*-doc.links.
+
  -- James McCoy   Sun, 01 May 2016 11:01:02 -0400
 
 haskell-devscripts (0.10.2.3) unstable; urgency=medium
-- 
2.8.1



signature.asc
Description: PGP signature


Bug#823689: hlibrary.mk: libghc-*-doc.links files not respected

2016-05-09 Thread Joachim Breitner
Hi,

Am Samstag, den 07.05.2016, 16:31 -0700 schrieb Sean Whitton:
> hlibrary.mk doesn't appear to do anything directly with
> changelogs.  So
> I think that something else it does is breaking CDBS's standard call to
> dh_installchangelogs.  But looking at
> /usr/share/cdbs/1/rules/debhelper.mk I can't see what that would be.

it runs
    run rm -f debian/libghc-${CABAL_PACKAGE}-doc.links 
debian/libghcjs-${CABAL_PACKAGE}-doc.links
which in clean, which explains the problem, and writes to the file in
the install target for the -dev package.

    if [ "${DEB_ENABLE_HOOGLE}" = "yes" ]
then
run find debian/${PKG}/${htmldir} -name "*.txt" \
-printf "%p ${hoogle}/${PKG}.txt\n" >> 
debian/lib${hc}-${CABAL_PACKAGE}-doc.links
run sed -i s,^debian/lib${hc}-${CABAL_PACKAGE}-doc,, 
debian/lib${hc}-${CABAL_PACKAGE}-doc.links
fi

What is a saner way of doing this? Calling dh_link directly with all
required links as arguments?

Greetings,
Joachim

-- 
Joachim “nomeata” Breitner
Debian Developer
  nome...@debian.org • https://people.debian.org/~nomeata
  XMPP: nome...@joachim-breitner.de • GPG-Key: 0xF0FBF51F
  https://www.joachim-breitner.de/


signature.asc
Description: This is a digitally signed message part


Bug#823689: hlibrary.mk: libghc-*-doc.links files not respected

2016-05-07 Thread Sean Whitton
Hello,

On Sat, May 07, 2016 at 11:01:13PM +0200, Joachim Breitner wrote:
> thanks for the report. Do you have a proposed fix?
> 
> (hlibrary.mk is a mess where everyone meddles; feel free to meddle
> yourself.)

Unfortunately, I can't see how to fix this.

hlibrary.mk doesn't appear to do anything directly with changelogs.  So
I think that something else it does is breaking CDBS's standard call to
dh_installchangelogs.  But looking at
/usr/share/cdbs/1/rules/debhelper.mk I can't see what that would be.

-- 
Sean Whitton


signature.asc
Description: PGP signature


Bug#823689: hlibrary.mk: libghc-*-doc.links files not respected

2016-05-07 Thread Joachim Breitner
Hi,

Am Samstag, den 07.05.2016, 11:03 -0700 schrieb Sean Whitton:
> hlibrary.mk invokes dh_link to create symlinks specified in files
> matching debian/libghc-*-{dev,prof}.links, but it seems to ignore
> files matching debian/libghc-*-doc.links.
> 
> For a package displaying this problem please see the branch debian of
> git repository https://git.spwhitton.name/propellor

thanks for the report. Do you have a proposed fix?

(hlibrary.mk is a mess where everyone meddles; feel free to meddle
yourself.)

Greetings,
Joachim

-- 
Joachim “nomeata” Breitner
Debian Developer
  nome...@debian.org • https://people.debian.org/~nomeata
  XMPP: nome...@joachim-breitner.de • GPG-Key: 0xF0FBF51F
  https://www.joachim-breitner.de/


signature.asc
Description: This is a digitally signed message part


Bug#823689: hlibrary.mk: libghc-*-doc.links files not respected

2016-05-07 Thread Sean Whitton
Package: haskell-devscripts
Version: 0.10.2.3
Severity: normal

Der maintainer,

hlibrary.mk invokes dh_link to create symlinks specified in files
matching debian/libghc-*-{dev,prof}.links, but it seems to ignore files
matching debian/libghc-*-doc.links.

For a package displaying this problem please see the branch debian of
git repository https://git.spwhitton.name/propellor

Thanks.

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: i386 (i686)

Kernel: Linux 4.5.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages haskell-devscripts depends on:
ii  cdbs   0.4.130
ii  dctrl-tools2.24-2
ii  debhelper  9.20160403
ii  dh-buildinfo   0.11+nmu1
ii  ghc [ghc-haddock]  7.10.3-7
ii  hscolour   1.23-3
ii  html-xml-utils 6.9-1

haskell-devscripts recommends no packages.

haskell-devscripts suggests no packages.

-- no debconf information

-- 
Sean Whitton


signature.asc
Description: PGP signature