From: Changqing Li Date: Wed, 2 Jul 2025 01:51:23 +0000 (+0800) Subject: mingetty: fix do_package warning X-Git-Tag: 2025-04.3-walnascar~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3efb82f1f51cbfa04f74626531615526e10bd2b2;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git mingetty: fix do_package warning 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. Signed-off-by: Changqing Li Signed-off-by: Steve Sakoman --- diff --git a/meta/recipes-extended/mingetty/mingetty_1.08.bb b/meta/recipes-extended/mingetty/mingetty_1.08.bb index 00d2564257a..5aa19f6c8fe 100644 --- a/meta/recipes-extended/mingetty/mingetty_1.08.bb +++ b/meta/recipes-extended/mingetty/mingetty_1.08.bb @@ -16,7 +16,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} }