From 30022f556bd706b3a5e5dfa876a5a8113302bbe6 Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Thu, 20 Oct 2022 15:18:09 +0200 Subject: [PATCH] run-postinsts: Set dependency for ldconfig to avoid boot issues If a package with a postsints script requires ldconfig, the package class adds a ldconfig postinst fragment to initialize it before. Systemd has its own ldconfig.service to initialize it and sometimes if both services are running at the same time in the first boot, the first one will work, but the second one will fail with the following error: ldconfig[141]: /sbin/ldconfig: Renaming of /etc/ld.so.cache~ to /etc/ld.so.cache failed: No such file or directory This commit adds an ordering dependency between them to make sure that only one service is running at the same time https://onedigi.atlassian.net/browse/DEL-8133 Signed-off-by: Arturo Buzarra --- .../run-postinsts/run-postinsts_%.bbappend | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 meta-digi-dey/recipes-devtools/run-postinsts/run-postinsts_%.bbappend diff --git a/meta-digi-dey/recipes-devtools/run-postinsts/run-postinsts_%.bbappend b/meta-digi-dey/recipes-devtools/run-postinsts/run-postinsts_%.bbappend new file mode 100644 index 000000000..5c0ba6ecc --- /dev/null +++ b/meta-digi-dey/recipes-devtools/run-postinsts/run-postinsts_%.bbappend @@ -0,0 +1,7 @@ +# Copyright (C) 2022 Digi International + +do_install:append() { + # Add ordering dependency between postinsts and ldconfig service + sed -i -e '/After=/ s/$/ ldconfig.service/' \ + ${D}${systemd_system_unitdir}/run-postinsts.service +}