diff mbox series

[meta-oe] mariadb: Remove the pre-generated bison output from the source tree

Message ID 20261028033423.2884120-1-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-oe] mariadb: Remove the pre-generated bison output from the source tree | expand

Commit Message

Khem Raj Oct. 28, 2026, 3:34 a.m. UTC
The release tarball ships sql/yy_{mariadb,oracle}.{cc,hh} generated on
MariaDB's build host. The parser is regenerated in ${B} with
bison-native, but sql/*.cc include "yy_mariadb.hh", which resolves to the
stale copy next to them in ${S}. Its #line directives carry
/home/buildbot/tarball-docker/... into the debug info and libmariadbd.a,
which the buildpaths QA check reports since it matches the /home/build
HOME of the yoe build container:

  QA Issue: File /usr/lib/libmariadbd.a in package
  libmysqlclient-staticdev contains a reference to the build host HOME
  directory. [buildpaths]

It also silently mixes a header from one bison run with a parser from
another. Delete the shipped files before configuring so that only the
build's own bison output is used.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 meta-oe/recipes-dbs/mysql/mariadb.inc | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc
index 390f9853bc..434d176774 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -113,6 +113,14 @@  do_compile:prepend:class-target () {
     sed -i -e "s:CMAKE_SYSROOT:CMAKE_SYSROOT_PLACE_HOLDER:g" ${S}/libmariadb/mariadb_config/mariadb_config.c.in
 }

+do_configure:prepend() {
+    # The parser is regenerated in ${B} with bison-native, but sql/*.cc
+    # would still #include the stale headers next to them in ${S}, whose
+    # #line directives carry /home/buildbot/... paths into the debug info.
+    rm -f ${S}/sql/yy_mariadb.cc ${S}/sql/yy_mariadb.hh \
+          ${S}/sql/yy_oracle.cc ${S}/sql/yy_oracle.hh
+}
+
 do_configure:append() {
     # handle distros with different values of ${libexecdir}
     libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'`