#1054124 dh-ada-library: dh_ada_library output causes /usr/share/ada/packaging.mk:81: *** missing separator error #1054124
- Package:
- dh-ada-library
- Source:
- dh-ada-library
- Description:
- Debian helper for Ada libraries
- Submitter:
- Daniel Gröber
- Date:
- 2024-01-25 16:12:03 UTC
- Severity:
- normal
Hi Nicolas, on my bookworm system importing dh-ada-library's packaging.mk is causing a make error. AFAICT due to `dh_ada_library --export-versions` including some copyright output in DEB_GNAT_VERSION: ``` $ dh_ada_library --export-versions DEB_ADA_SOURCE_DIR:=usr/share/ada/adainclude DEB_LIB_DIR:=usr/lib/x86_64-linux-gnu DEB_ADA_LIB_INFO_DIR:=usr/lib/x86_64-linux-gnu/ada/adalib DEB_GNAT_PROJECT_DIR:=usr/share/gpr DEB_GNAT_VERSION:=GNATMAKE 10.2.1 20210110 Copyright (C) 1995-2020, Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ``` I'm not sure what changed to break this, ghdl has been using dh-ada-library for a while now and this wasn't a problem before. Thanks, --Daniel
Hi Nicolas,
This bug is still blocking my work on ghdl, did you have a chance to look
into it?
Looking at the code:
my $deb_gnat_version = `gnatmake --version` or error $!;
$deb_gnat_version =~ s/[^\n]* (\d+)\.\d+\.\d+\n.*/$1/s;
I don't really know perl but my understanding is that =~ is only a match
predicate and doesn't do any replacement. Since the regex below uses a
capture group without using the resulting $1 I wonder if what's missing is
`$deb_gnat_version = $1`?
I don't really see how this could have ever worked tho so I'm still
perplexxed how ada/packaging.mk managed to not blow up previously unless
gnatmake output changed?
Thanks,
--Daniel
Hello. I failed to reproduce your issue with debhelper 13.11.10 dh-ada-library 8.6 gnat-10 10.5.0-2 That is, the output is DEB_GNAT_VERSION:=10 Can you reproduce the issue? Which version of the 'gnat' package is involved, if any? Also, in which source tree/commit are you executing dh_ada_library? One could imagine a problem while parsing debian/control.