[OE-core] RFE: make the init manager an image feature (again)
Phil Blundell
pb at pbcl.net
Thu Feb 21 12:01:03 UTC 2013
On Thu, 2013-02-21 at 08:50 -0300, Otavio Salvador wrote:
> I fully agree; we have many cases where classes workaround system
> issues/limitations to avoid code duplications so I see no reason why
> this needs to be different with systemd.
If you wanted to propose an addition to the class that purely abstracted
out the duplication (without adding any potential bear-traps) then I
would have thought that should be fine.
For example, something along the approximate lines of:
install_systemd_collateral_file() {
if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false')}; then
sed 's/@bindir@/${bindir}/' < $1 > $2
fi
}
seems like it would address most of the concerns about code duplication
without introducing any hairy heuristics or unpredictably spontaneous
behaviour in the class.
p.
More information about the Openembedded-core
mailing list