[debhelper-devel] dh_installinit tries to do dh_systemd_start's job

Peter Pentchev roam at ringlet.net
Tue Jul 19 12:36:48 UTC 2016


Hi,

Now that dh_systemd_start and dh_systemd_enable are part of debhelper
proper, there's a bit of duplication of work between dh_installinit and
dh_systemd_start.  Now don't get me wrong: I do agree that installing
and configuring systemd service files correctly is a Good Thing(tm);
it's just that I'm afraid that there are some more rough edges to
polish.

So far I've only seen the problem in a package that provides both
a systemd service file and a SysV init script.  If the service file is
named debian/package.service, dh_systemd_start and dh_systemd_enable
will pick it up and process it just fine... but then dh_installinit will
*also* pick it up.  It's invoked because debian/package.init exists, but
it tries to process systemd and upstart files, too, if it finds them,
so it tries to do once again what dh_systemd_start just did, and, well,
it even gets it subtly wrong :)

So, hm, I'm not sure what the proper resolution would be.  Would it be
possible for dh_installinit to figure out that the systemd sequence is
enabled?  If so, then this might be the best solution - in compat 10
with the systemd sequence enabled, ignore any systemd service files.

Again, don't get me wrong, I *am* very happy with the way debhelper
development is progressing; thanks a lot for that!

G'luck,
Peter

-- 
Peter Pentchev  roam at ringlet.net roam at FreeBSD.org pp at storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debhelper-devel/attachments/20160719/cf43c1a4/attachment.sig>


More information about the debhelper-devel mailing list