On Tue, Apr 09, 2019 at 09:49:26PM +0200, Sven Hartge wrote:
> On Thu, 04 Apr 2019 14:24:40 +0100 Sam Morris <s...@robots.org.uk> wrote:
> 
> > # turns out this was a local problem
> 
> For the archives: Could you please describe the local problem and the
> solution? Because I am having exactly the same problem with plymouth here.
> 
> Grüße,
> Sven.
> 

Of course! I hate useless 'I figured out how to fix this' messages more
than anyone, so I don't usually send them, but for me this really was
purely a local problem of my own making.

For the record, a few months ago I decided to experiment with building
initramfs images using COMPRESS=lz4. I ran into some problem that
required me to modify /usr/sbin/update-initramfs, so I used dpkg-divert
to rename that file, leaving in its place a version with some local
modifications to get lz4 working. And all was good for a few months...

... until a new version of initramfs-tools came out. dpkg dutifully
unpacked the updated update-initramfs to
/usr/sbin/update-initramfs.local, leaving me running the Frankenstein's
Monster combination of /usr/sbin/update-initramfs from version 0.132,
with the various library files under /usr/share/initramfs-tools being
from version 0.133.

Unsurprisingly, fireworks resulted, and I was left very confused as to
why no one else had noticed... of course, the reason was that no one
else had been so silly as to combine the files from different releases
of initramfs-tools together and expect the result to work. And then
forgotten that they had done so, only to be reminded _after_ sending out
a public bug report...

So there you have it, at least this time the problem was entirely my own
fault. :)

You might find some of Bash's debugging functions useful when trying to
trace your own problem:

 1. Change the problematic hook script to use #!/bin/bash
 2. Set the following variable:
    PS4=$'$? \\ (${BASH_SOURCE[0]}:${LINENO}): ${FUNCNAME[0]:--} 
[SHLVL=${SHLVL} BASH_SUBSHELL=${BASH_SUBSHELL}]\n  '
 3. Add 'set -x' at the point where you want to start tracing

That adds current line and function information to the normally terse
result of using 'set -x', which I find makes it a lot easier to figure
out what is going on in a complex shell script that sources lots of
files and makes use of lots of functions, etc.

Good luck! :)

-- 
Sam Morris <https://robots.org.uk/>
CAAA AA1A CA69 A83A 892B  1855 D20B 4202 5CDA 27B9

Reply via email to