[oe-commits] [openembedded-core] 06/08: image: call systemctl preset-all for images

git at git.openembedded.org git at git.openembedded.org
Thu May 2 21:21:00 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit a57678a076109c42fbdf7531e90ff4491b387d53
Author: Alex Kiernan <alex.kiernan at hivehome.com>
AuthorDate: Thu May 2 22:09:44 2019 +0100

    image: call systemctl preset-all for images
    
    Rather than rely on systemd's default invocation of preset-all at
    runtime, we pre-populate the symlink tree as part of of the image. This
    is done late so any overrides of presets during rootfs construction
    should already have happened.
    
    Whilst we don't strictly need this for the read-write root case, it
    avoids boot time churn; for read-only root we have to do it here.
    
    Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/image.bbclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 276d0d3..a23403c 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -664,6 +664,13 @@ reproducible_final_image_task () {
         find  ${IMAGE_ROOTFS} -exec touch -h  --date=@$REPRODUCIBLE_TIMESTAMP_ROOTFS {} \;
     fi
 }
-IMAGE_PREPROCESS_COMMAND_append = " reproducible_final_image_task; "
+
+IMAGE_EXTRADEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-systemctl-native', '', d)}"
+
+systemd_preset_all () {
+	systemctl --root="${IMAGE_ROOTFS}" --preset-mode=enable-only preset-all
+}
+
+IMAGE_PREPROCESS_COMMAND_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd_preset_all;', '', d)} reproducible_final_image_task; "
 
 CVE_PRODUCT = ""

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list