summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2024-12-04 07:48:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-12-12 13:22:08 +0000
commit21a9165058a60aaee3ec5c40c6cfecfff0ff64d8 (patch)
tree116c009acf9e9eb6477095745a70ee00989d4540
parent90c6a405c547aaaf5f78779853ea4539724ca837 (diff)
downloadpoky-21a9165058a60aaee3ec5c40c6cfecfff0ff64d8.tar.gz
systemd-compat-units: execute postinst on target
There is a race here where postinst relies on existence of various files from other packages on the target rootfs to operate properly, but doesn't ensure that it runs after all of those packages have been installed. Adding dependencies on those packages is not a solution as the recipe is not supposed to bring them into rootfs, only make adjustments if they are present. This commit moves postinst execution to the first boot; another solution would be to replace the whole recipe with ROOTFS_POSTPROCESS_COMMAND. This was exposed with rpm 4.20 which rearranges the order in which packages are installed, and exposes the issue. (From OE-Core rev: e88f22da19a7f3f9bf23f2a607ffde6b5b1a3265) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/systemd/systemd-compat-units.bb2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb
index b929545823..3325739544 100644
--- a/meta/recipes-core/systemd/systemd-compat-units.bb
+++ b/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -26,7 +26,7 @@ SYSTEMD_DISABLED_SYSV_SERVICES = " \
26 syslog.busybox \ 26 syslog.busybox \
27" 27"
28 28
29pkg_postinst:${PN} () { 29pkg_postinst_ontarget:${PN} () {
30 30
31 test -d $D${sysconfdir}/init.d || exit 0 31 test -d $D${sysconfdir}/init.d || exit 0
32 cd $D${sysconfdir}/init.d 32 cd $D${sysconfdir}/init.d