checklayer: fix get_depgraph() hang when command fails
The get_depgraph() function hangs indefinitely when a layer causes
command failures (e.g. meta-virtualization) because:
1. bb.command.CommandFailed was not included in the event mask passed
to set_event_mask(), so the failure event was silently dropped and
the while True loop never received a terminating event.
2. There was no timeout handling for the case where wait_event()
repeatedly returns None, leaving no escape from the loop.
Add CommandFailed to the event mask so failure events are properly
received and handled. Also add a timeout counter that raises
RuntimeError after 300 consecutive seconds of no events, preventing
an infinite hang.
Fixes [YOCTO #16170]
Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>