#1063474 insserv messages about loops are too obtuse

Package:
insserv
Source:
insserv
Description:
boot sequence organizer using LSB init.d script dependency information
Submitter:
Jakob Bohm
Date:
2024-02-08 18:45:03 UTC
Severity:
normal
Tags:
#1063474#5
Date:
2024-02-08 17:45:29 UTC
From:
To:
Dear Maintainer,

When insserv reports that it sees a dependency loop between some init
scripts, it does so in a very obtuse way by providing message lines that
mention one half of a dependency pair, but not what it thinks depends on
what and how that forms a loop:
--- Expected output (with pseudo names): ---
insserv: There is a loop between service foo and bar for start action
insserv:  loop step 1: foo depends on baz
insserv:  loop step 2: baz depends on $quux
insserv:  loop step 3: $quux includes quuux in /etc/insserv.conf.d/02buggy.conf
insserv:  loop step 4: quuux depends on bar
insserv:  loop step 5: bar depends on foo
--- END Expected output (with pseudo names): ---
--- Actual output (with pseudo names): --- insserv: There is a loop between service foo and bar if started insserv: loop involving service baz at depth 911 insserv: loop involving service quuux at depth 888 --- END Actual output (with pseudo names): --- In the actual output, the depth numbers are meaningless and the phrasing suggests incomplete out of order information. Also it doesn't state when/if/how configuration files participate in the loops. In my preferred example, all loop steps are shown, lines are numbered to help dealing with accidental output mangling on an emergency serial console, and rules from config files are called out with specificity and origin.
#1063474#8
Date:
2024-02-08 18:12:12 UTC
From:
To:
Jakob,

Many thanks for this.

Jesse,

What are your thoughts? Is this something you can improve or address upstream?

Thanks

Mark

#1063474#15
Date:
2024-02-08 18:30:42 UTC
From:
To:
I agree, the suggested out from Jakob makes more sense and would be more
useful.

I will look at insserv's code and see how it handles this.  I'm not sure
if this is a quick-n-easy change or if it's going to involve digging
through insserv's curious brand of arcane magic. (Hopefully for the
former.) I'm also happy to accept patches that do something like what
Jakob is suggesting if someone already has an idea of how they'd like to
implement this change.

- Jesse