[OE-core] [PATCH] packagegroup: Add init-manager sanity check

Richard Purdie richard.purdie at linuxfoundation.org
Thu Apr 18 10:28:29 UTC 2013


On Thu, 2013-04-18 at 12:19 +0200, Enrico Scholz wrote:
> 
> Richard Purdie
> <richard.purdie-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r at public.gmane.org>
> writes:
> 
> > Currently, you can set VIRTUAL-RUNTIME_init_manager to an init system
> > that isn't in DISTRO_FEATURES. This leads to head scratching over
> > unbootable images.
> 
> Because this sanity check is placed into an anonymous function, this
> change affects also images which do not not include packagegroup-core*
> in their images and are not using VIRTUAL-RUNTIME_init_manager at all.

Affects in that it runs the anonymous python fragment but does nothing? 

If you're worried about that overhead, there are fragments elsewhere
which have a much more significant overhead.

> It would be probably better to execute this check only, when the package
> gets built.  Or add
> 
> DEPENDS += "${@some_check(d)}"
> 
> where some_check(d) evaluates to 'broken-virtual-runtime' or so when bad
> configuration has been detected and empty else.

I did give this quite a bit of thought and couldn't come up with a
better way to handle it. The DEPENDS change above would certainly
trigger an error but it wouldn't be obvious to the user what happened or
how they might fix it. Making that approach give a better error message
would be much more invasive and have worse performance impact.

Other proposals for solutions are welcome. I thought it better to catch
a common user misconfiguration than generate broken images silently
though.

Cheers,

Richard





More information about the Openembedded-core mailing list