Bug#908294: hamlib: FTBFS (Syntax error: "then" unexpected)

2018-09-08 Thread Enrico Rossi
tags 908294 + fixed pending confirmed
stop

Hi Santiago,

it is strange why we were able to build it without catch the error, see
buildd logs.
Anyway you are right and I have fixed it on salsa.

Thanks for reporting.

-- 
GPG key: 4096R/5E0195FAF2133176 2010-10-19 Enrico Rossi 



Processed: Re: Bug#908294: hamlib: FTBFS (Syntax error: "then" unexpected)

2018-09-08 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> tags 908294 + fixed pending confirmed
Bug #908294 [src:hamlib] hamlib: FTBFS (Syntax error: "then" unexpected)
Added tag(s) confirmed and fixed.
> stop
Stopping processing here.

Please contact me if you need assistance.
-- 
908294: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908294
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#908294: hamlib: FTBFS (Syntax error: "then" unexpected)

2018-09-07 Thread Santiago Vila
Package: src:hamlib
Version: 3.2-2
Severity: serious
Tags: ftbfs

Dear maintainer:

I tried to build this package in buster using dpkg-buildpackage -A
but it failed:


[...]

   debian/rules override_dh_auto_install-indep
make[1]: Entering directory '/<>'
pyversions: missing X(S)-Python-Version in control file, fall back to 
debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
py3versions: no X-Python3-Version in control file, using supported versions
mkdir -p /<>/debian/tmp/usr/share/doc/hamlib
cp -r /<>/build-indep/doc/html \
/<>/debian/tmp/usr/share/doc/hamlib/
make[1]: Leaving directory '/<>'
   debian/rules override_dh_install
make[1]: Entering directory '/<>'
pyversions: missing X(S)-Python-Version in control file, fall back to 
debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
py3versions: no X-Python3-Version in control file, using supported versions
dh_install
lts=/<>/debian/lua-hamlib2/usr/share/doc/lua-hamlib2/luatest.lua \
if [ -f "$lts" ]; then \
rm -f $lts; \
fi
/bin/sh: 2: Syntax error: "then" unexpected
make[1]: *** [debian/rules:105: override_dh_install] Error 2
make[1]: Leaving directory '/<>'
make: *** [debian/rules:18: binary-indep] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary-indep subprocess 
returned exit status 2


Looking at the code:

override_dh_install:
dh_install
lts=$(CURDIR)/debian/lua-hamlib2/usr/share/doc/lua-hamlib2/luatest.lua \
if [ -f "$$lts" ]; then \
rm -f $$lts; \
fi

it seems there is a missing ";" at the end of lts= line.

However, if you want to remove a file unconditionally no matter what, I wonder
why don't you do this instead:

--- a/debian/rules
+++ b/debian/rules
@@ -102,10 +102,7 @@ override_dh_auto_install-indep:
 
 override_dh_install:
dh_install
-   lts=$(CURDIR)/debian/lua-hamlib2/usr/share/doc/lua-hamlib2/luatest.lua \
-   if [ -f "$$lts" ]; then \
-   rm -f $$lts; \
-   fi
+   rm -f debian/lua-hamlib2/usr/share/doc/lua-hamlib2/luatest.lua
 
 override_dh_auto_clean:
dh_auto_clean


Or maybe it would be even better to use "dh_install -Xexcluded_file" in a 
single line.

Thanks.