]> code.ossystems Code Review - openembedded-core.git/commit
image.bbclass: fix systemd_preset_all
authorChen Qi <Qi.Chen@windriver.com>
Mon, 1 Jul 2019 04:15:33 +0000 (12:15 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 2 Jul 2019 07:10:36 +0000 (08:10 +0100)
commitc9854a4ab6af9e60b1a588a87b9a062624af6fae
tree5f3ec12d9f07bb06dfa291281273a156c8985fca
parentec644192c758ce1ec90c487a0fff69d6de0ca55d
image.bbclass: fix systemd_preset_all

Check the existence of systemd before using systemctl to preset units.
This is because even if 'systemd' is in DISTRO_FEATURES, it's possible
that systemd is not even installed. e.g. container-test-image in
meta-selftest layer.

As systemd DEPENDS on systemd-systemctl-native, the existence of systemd
also ensures the existence of systemd-systemctl-native.

This would fix the following test case when using systemd as the init
manager.

  containerimage.ContainerImageTests.test_expected_files

Also remove the IMAGE_EXTRADEPENDS setting, as nothing references this
variable.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image.bbclass