diff mbox series

[meta-oe,060/128] lcov: upgrade 1.16 -> 2.4

Message ID 20260628081122.178348-60-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-filesystems,001/128] ifuse: upgrade 1.2.0 -> 1.2.1 | expand

Commit Message

Khem Raj June 28, 2026, 8:10 a.m. UTC
Do not package the upstream test suite: the tests under datadir/lcov/tests
are not needed at runtime and pull fatal file-rdeps on /bin/bash,
/usr/bin/bash and /bin/env, so remove them in do_install.

Pass DESTDIR separately to fix buildpaths QA. The recipe ran
'oe_runmake install PREFIX=${D}${prefix}', folding the destdir into PREFIX;
lcov's Makefile bakes the runtime --bindir/--libdir into the installed perl
modules and manpages, so the build path leaked into the package:

  do_package_qa: QA Issue: File /usr/lib/lcov/lcovutil.pm ... contains
  reference to TMPDIR / the build host HOME directory [buildpaths]

Use PREFIX=${prefix} DESTDIR=${D} (and CFG_DIR=${sysconfdir}) so the baked
paths are the runtime ones.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../lcov/{lcov_1.16.bb => lcov_2.4.bb}              | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
 rename meta-oe/recipes-support/lcov/{lcov_1.16.bb => lcov_2.4.bb} (71%)
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/lcov/lcov_1.16.bb b/meta-oe/recipes-support/lcov/lcov_2.4.bb
similarity index 71%
rename from meta-oe/recipes-support/lcov/lcov_1.16.bb
rename to meta-oe/recipes-support/lcov/lcov_2.4.bb
index a889b3fa82..4c121b9cf6 100755
--- a/meta-oe/recipes-support/lcov/lcov_1.16.bb
+++ b/meta-oe/recipes-support/lcov/lcov_2.4.bb
@@ -51,13 +51,22 @@  RDEPENDS:${PN}:append:class-target = " \
     gcov-symlinks \
 "
 SRC_URI = "https://github.com/linux-test-project/lcov/releases/download/v${PV}/lcov-${PV}.tar.gz"
-SRC_URI[sha256sum] = "987031ad5528c8a746d4b52b380bc1bffe412de1f2b9c2ba5224995668e3240b"
+SRC_URI[sha256sum] = "3457825c6b2fe4ef77c782b82a23875c84a3c955243823f05d8f2dec0d455820"
 
 UPSTREAM_CHECK_URI = "https://github.com/linux-test-project/lcov/releases"
 UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
 
 do_install() {
-    oe_runmake install PREFIX=${D}${prefix} CFG_DIR=${D}${sysconfdir} LCOV_PERL_PATH="/usr/bin/env perl"
+    # Pass the runtime PREFIX and the staging DESTDIR separately. lcov's
+    # Makefile bakes the runtime --bindir/--libdir ($(PREFIX)/...) into the
+    # installed perl modules and manpages, so folding ${D} into PREFIX would
+    # embed the build path and trip the buildpaths QA check.
+    oe_runmake install PREFIX=${prefix} DESTDIR=${D} CFG_DIR=${sysconfdir} LCOV_PERL_PATH="/usr/bin/env perl"
+
+    # The upstream test suite is shipped under ${datadir}/lcov/tests and is
+    # not needed at runtime. Its shell scripts pull in unwanted file-rdeps on
+    # /bin/bash, /usr/bin/bash and /bin/env, so drop it from the package.
+    rm -rf ${D}${datadir}/lcov/tests
 }
 
 BBCLASSEXTEND = "native nativesdk"