]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
run-postinsts: Set dependency for ldconfig to avoid boot issues
authorArturo Buzarra <arturo.buzarra@digi.com>
Thu, 20 Oct 2022 13:55:31 +0000 (15:55 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 Mar 2023 09:48:58 +0000 (10:48 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service

index 7f72f3388afbe8ec22365332db40232337c1c9e5..b6b81d5c1a15e35460b1bb9c63d917cb5144e2b6 100644 (file)
@@ -1,7 +1,7 @@
 [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]