diff mbox series

[v3,2/2] mdadm: catch sed substitution failure during install

Message ID 20260218090606.3693584-2-ankur.tyagi85@gmail.com
State Under Review
Headers show
Series [v3,1/2] mdadm: upgrade 4.4 -> 4.5 | expand

Commit Message

Ankur Tyagi Feb. 18, 2026, 9:06 a.m. UTC
From: Ankur Tyagi <ankur.tyagi85@gmail.com>

This patch is to validate a possible race condition theory during install.
Also fail the build if sed substitution still fails for further investigation.

Details: https://bugzilla.yoctoproject.org/show_bug.cgi?id=16166

[YOCTO #16166]

Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
---
 meta/recipes-extended/mdadm/mdadm_4.5.bb | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-extended/mdadm/mdadm_4.5.bb b/meta/recipes-extended/mdadm/mdadm_4.5.bb
index b30d3d776e..fec29828c1 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.5.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.5.bb
@@ -40,11 +40,21 @@  EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CWFLAGS="" CXFLAGS="${CFLAGS}" SYSTEMD_DIR=${sys
 DEBUG_OPTIMIZATION:append = " -Wno-error"
 
 do_install() {
-        oe_runmake 'DESTDIR=${D}' install install-systemd
+        install -d ${D}/${datadir}/
+
+        oe_runmake -j 1 'DESTDIR=${D}' install install-systemd
+
         install -d ${D}/${sysconfdir}/
         install -m 644 ${S}/documentation/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
         install -d ${D}/${sysconfdir}/init.d
         install -m 755 ${UNPACKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
+        # temp change
+        install -m 644 ${S}/udev-md-raid-safe-timeouts.rules ${D}/${sysconfdir}/tmp-file
+
+        if grep -q "BINDIR" ${D}${datadir}/${BPN}/mdcheck; then
+            bberror "Build failed: 'BINDIR' placeholder found in mdcheck."
+            bbfatal_log "sed command in Makefile failed to execute correctly."
+        fi
 }
 
 do_compile_ptest() {