#1123722 dpkg-gensymbols: check for missing templates

#1123722#5
Date:
2025-12-20 12:19:41 UTC
From:
To:
Hi,

I was working on a package, and produced this
debian/libmpathpersist0.symbols file:
E: libmpathpersist0: invalid-template-id-in-symbols-file 1 [symbols:12]
E: libmpathpersist0: invalid-template-id-in-symbols-file 1 [symbols:22]
E: libmpathpersist0: invalid-template-id-in-symbols-file 1 [symbols:23]
E: libmpathpersist0: invalid-template-id-in-symbols-file 1 [symbols:6]
E: libmpathpersist0: invalid-template-id-in-symbols-file 1 [symbols:9]

If lintian is correct here, please have dpkg-gensymbols fail with an error.

Thanks,
Chris

#1123722#10
Date:
2025-12-20 13:32:12 UTC
From:
To:
Hi!

I was very confused for a bit, because the id seems fine. So I think
lintian diagnostic here is very confusing. The problem is that the
alternative dependency syntax is invalid. It should be something like:

  | libmpathpersist-internal-symbols-invalid #MINVER#

When installing that package, dpkg-shlibdeps would produce something
similar to the following warning+error:

  dpkg-shlibdeps: warning: can't parse dependency libmd.so.0 libmd-invalid (>= 0.0.0)
  dpkg-shlibdeps: error: invalid dependency got generated: libmd.so.0 libmd-invalid (>= 0.0.0), libc6 (>= 2.34), libmd0 (>= 0.0.0)

But that's certainly too late, and having to inflict this kind of
breakage on the archive to be able to notice the mistake is not a
nice thing for the tool to be doing.

I guess the problem is that the template is not a valid dependency, so
it will be tricky to verify at that time, but I guess the parser could
be made more strict in any case. Will see how to improve this. Thanks,
for the report!

Regards,
Guillem