Subject: debhelper: dh_installsystemd --name documentation doesn't match actual 
behavior
Package: debhelper
Version: 13.11.6
Severity: normal

Dear Debhelper Maintainers,

The dh_installsystemd documentation says that

   As an example, B<dh_installsystemd --name foo> will look for
   F<<< I<debian/package.>B<< I<foo> >>I<.service> >>> instead of
   F<< I<debian/package.service> >>).  

after building a handful of packages and having this silently not work
(the silence isn't a problem per-se, it's just supposed to look for a
correctly named file and use it if present) I eventually figured out
that it would instead install the file F<< I<debian/name.service> >>,
ie. it would drop I<package> entirely and just use the --name
argument.

There is also a lengthy comment in the source where the work happens
that matches the POD documentation, but the code itself at that point
simply does

   my $name = $dh{NAME} // $package;

which doesn't concatenate anything, it just uses --name if defined, and
package if not.

A quick glance through git history shows that it's behaved this way
since at least 2018 and it looks like that was just an accurate
refactoring of the previous code - I haven't dug further, but perhaps
that is enough to suggest that 5 years is long enough that the
documentation should change to match the behaviour rather than changing
the code (possibly across debhelper's famously well-managed
compatibility levels.)

(If you agree with my assessment, I would be happy to contribute a
documentation patch, though it would be US/English only, I haven't
worked with translations before.)

Reply via email to