Skip to contentSkip to conversation

mingetty: fix do_package warning

PATCH New [email protected] 1 participant 1 message Jun 30, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mingetty: fix do_package warning

From: Changqing Li <[email protected]>

Reproduce steps(Under the same project dir):
1. enable DISTRO_FEATURES usrmerge, bitbake mingetty
2. disable DISTRO_FEATURES usrmerge, bitbake mingetty

Result in step 2:
WARNING: mingetty-1.08-r3 do_package: mingetty: NOT adding alternative provide /usr/sbin/getty: /usr/sbin/mingetty does not exist
WARNING: mingetty-1.08-r3 do_package: QA Issue: mingetty: Files/directories were installed but not shipped in any package:
/sbin
/usr/sbin

In step1, Line SBINDIR=/sbin is replaced to SBINDIR=/usr/sbin, in step2, since do_fetch does not rerun, Makefile still has SBINDIR=/usr/sbin, so sed not works as expected, SBINDIR still equal to /usr/sbin when disable usrmerge. And cause above two warnings.

---
 meta/recipes-extended/mingetty/mingetty_1.08.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/mingetty/mingetty_1.08.bb +1 -1
index be059995e7..892233054b 100644
@@ -15,7 +15,7 @@ EXTRA_OEMAKE = "CC='${CC}' \
                 CFLAGS='${CFLAGS} -D_GNU_SOURCE'"
 
 do_install(){
-    sed -i -e "s;SBINDIR=/sbin;SBINDIR=$base_sbindir;"  ${S}/Makefile
+    sed -i -e "/^SBINDIR=/c SBINDIR=$base_sbindir"  ${S}/Makefile
     install -d ${D}${mandir}/man8 ${D}/${base_sbindir}
     oe_runmake install DESTDIR=${D}
 }
Signature · 1 line
2.34.1