Hi!

On Sat, 2025-12-20 at 13:19:41 +0100, Chris Hofstaedtler wrote:
> Package: dpkg-dev
> Version: 1.23.3
> Severity: wishlist

> I was working on a package, and produced this 
> debian/libmpathpersist0.symbols file:
> 
> > libmpathpersist.so.0 libmpathpersist0 #MINVER#
> > | libmpathpersist.so.0 libmpathpersist-internal-symbols-invalid #MINVER#
> > * Build-Depends-Package: libmpathpersist-dev
> >  LIBMPATHPERSIST_2.1.0@LIBMPATHPERSIST_2.1.0 0.11.1
> >  LIBMPATHPERSIST_2.2.0@LIBMPATHPERSIST_2.2.0 0.11.1
> >  __mpath_persistent_reserve_in@LIBMPATHPERSIST_2.1.0 0.11.1
> >  __mpath_persistent_reserve_out@LIBMPATHPERSIST_2.1.0 0.11.1
> >  libmpathpersist_exit@LIBMPATHPERSIST_2.1.0 0.11.1
> >  libmpathpersist_init@LIBMPATHPERSIST_2.1.0 0.11.1
> >  mpath_lib_exit@LIBMPATHPERSIST_2.1.0 0.11.1
> >  mpath_lib_init@LIBMPATHPERSIST_2.1.0 0.11.1
> >  mpath_mx_alloc_len@LIBMPATHPERSIST_2.1.0 0.11.1
> >  mpath_persistent_reserve_free_vecs@LIBMPATHPERSIST_2.1.0 0.11.1
> >  mpath_persistent_reserve_in@LIBMPATHPERSIST_2.1.0 0.11.1
> >  mpath_persistent_reserve_in__@LIBMPATHPERSIST_2.2.0 0.11.1
> >  mpath_persistent_reserve_init_vecs@LIBMPATHPERSIST_2.1.0 0.11.1
> >  mpath_persistent_reserve_out@LIBMPATHPERSIST_2.1.0 0.11.1
> >  mpath_persistent_reserve_out__@LIBMPATHPERSIST_2.2.0 0.11.1
> >  __LIBMPATHPERSIST_INT_2.1.0@__LIBMPATHPERSIST_INT_2.1.0 0.13.0-1 1
> >  dumpHex@__LIBMPATHPERSIST_INT_2.1.0 0.13.0-1 1
> >  mpath_alloc_prin_response@__LIBMPATHPERSIST_INT_2.1.0 0.13.0-1 1
> >  prin_do_scsi_ioctl@__LIBMPATHPERSIST_INT_2.1.0 0.13.0-1 1
> >  prout_do_scsi_ioctl@__LIBMPATHPERSIST_INT_2.1.0 0.13.0-1 1
> 
> dpkg-gensymbols apparently accepts this, but lintian fails:
> 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.

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

Reply via email to