Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] run-postinsts: Set dependency for ldconfig to avoid boot issues
@ 2022-10-20 13:55 Arturo Buzarra
  2022-10-20 15:07 ` [OE-core] " Khem Raj
  2022-10-20 19:02 ` Michael Opdenacker
  0 siblings, 2 replies; 8+ messages in thread
From: Arturo Buzarra @ 2022-10-20 13:55 UTC (permalink / raw)
  To: openembedded-core

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 a ordering dependency between them to make sure that only one
service is running at the same time.

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
---
 .../run-postinsts/run-postinsts/run-postinsts.service           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
index 7f72f3388a..b6b81d5c1a 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
@@ -1,9 +1,9 @@
 [Unit]
 Description=Run pending postinsts
 DefaultDependencies=no
-After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount
+After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount ldconfig.service
 Before=sysinit.target
 
 [Service]
 Type=oneshot
 ExecStart=#SBINDIR#/run-postinsts
-- 
2.38.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-16 14:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-20 13:55 [PATCH] run-postinsts: Set dependency for ldconfig to avoid boot issues Arturo Buzarra
2022-10-20 15:07 ` [OE-core] " Khem Raj
2022-10-20 15:18   ` Alexander Kanavin
2022-10-20 15:26     ` Khem Raj
2022-10-20 15:36       ` Alexander Kanavin
2022-10-20 15:39         ` Khem Raj
2022-10-20 19:02 ` Michael Opdenacker
2023-03-16 14:29   ` Jermain Horsman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox