Skip to contentSkip to conversation

Fix failures of bash QA buildpaths check

PATCH New Kai Kang 1 participant 2 messages Jul 14, 2015

lore
Share & tools
lore

Kai Kang

author
#0 lore raw

cover Fix failures of bash QA buildpaths check

The following changes since commit 190ec1145dd1963cbe562bb250343b8d3acc1f40:

opkg-utils: Change alternatives lib path from /usr/lib/opkg to /var/lib/opkg (2015-07-12 22:55:55 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib kangkai/bash
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=kangkai/bash

Kai Kang (1):
bash: fix for QA buildpaths check

 meta/recipes-extended/bash/bash-3.2.48/run-ptest | 2 --
 meta/recipes-extended/bash/bash.inc              | 8 ++------
 meta/recipes-extended/bash/bash/run-ptest        | 5 ++++-
 meta/recipes-extended/bash/bash_3.2.48.bb        | 6 ++++++
 4 files changed, 12 insertions(+), 9 deletions(-)
 delete mode 100644 meta/recipes-extended/bash/bash-3.2.48/run-ptest
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 bash: fix for QA buildpaths check

When enable QA check 'buildpaths', it shows warnings/errors:

WARNING: QA Issue: File /work/core2-64-poky-linux/bash/4.3-r1/packages-split/bash-ptest/usr/lib64/bash/ptest/Makefile in package contained reference to tmpdir [buildpaths]
WARNING: QA Issue: File /work/core2-64-poky-linux/bash/4.3-r1/packages-split/bash/usr/bin/bashbug
in package contained reference to tmpdir [buildpaths]

bashbug is a utility for reporting bugs in Bash to the maintainers. It sends the build informations such as CC and CFLAGS which contain build directories to maintainer to analysis the bug. It should not be treated as a failure. So just skip buildpaths check for package bash.

And it uses target runtest in /usr/lib64/bash/ptest/Makefile to run ptest. Rewrite script run-ptest and remove Makefile file to pass buildpaths QA check.

For file y.tab.c. in bash 3.2.48, it has lines such as:

#line 21 "...tmp/work/core2-64-poky-linux/bash/3.2.48-r11/bash-3.2.48/parse.y"

Remove $S from file y.tab.c to fix buildpaths check too.

---
 meta/recipes-extended/bash/bash-3.2.48/run-ptest | 2 --
 meta/recipes-extended/bash/bash.inc              | 8 ++------
 meta/recipes-extended/bash/bash/run-ptest        | 5 ++++-
 meta/recipes-extended/bash/bash_3.2.48.bb        | 6 ++++++
 4 files changed, 12 insertions(+), 9 deletions(-)
 delete mode 100644 meta/recipes-extended/bash/bash-3.2.48/run-ptest
meta/recipes-extended/bash/bash-3.2.48/run-ptest deleted +0 -2
deleted file mode 100644
index 8dd3b99..0000000
@@ -1,2 +0,0 @@
-#!/bin/sh
-make -k THIS_SH=/bin/bash BUILD_DIR=. runtest
meta/recipes-extended/bash/bash.inc +2 -6
index c06f157..68c9470 100644
@@ -23,6 +23,8 @@ RDEPENDS_${PN} += "base-files"
 RDEPENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}-ptest += "make"
 
+INSANE_SKIP_${PN} = "buildpaths"
+
 do_configure_prepend () {
 	if [ ! -e ${S}/acinclude.m4 ]; then
 		cat ${S}/aclocal.m4 > ${S}/acinclude.m4
@@ -40,15 +42,9 @@ do_install_append () {
 		mv ${D}${bindir}/bash ${D}${base_bindir}
 	fi
 }
-do_install_append_class-target () {
-	# Clean host path in bashbug
-	sed -i -e "s,${STAGING_DIR_TARGET},,g" ${D}${bindir}/bashbug
-}
 
 do_install_ptest () {
 	make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
-	cp ${B}/Makefile ${D}${PTEST_PATH}
-        sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
 }
 
 pkg_postinst_${PN} () {
meta/recipes-extended/bash/bash/run-ptest +4 -1
index 8dd3b99..5dee19e 100644
@@ -1,2 +1,5 @@
 #!/bin/sh
-make -k THIS_SH=/bin/bash BUILD_DIR=. runtest
+
+TESTDIR=$(dirname `readlink -f $0`)
+cd $TESTDIR/tests
+THIS_SH=/bin/bash /bin/sh run-all
meta/recipes-extended/bash/bash_3.2.48.bb +6 -0
index 34272d1..3b4eceb 100644
@@ -43,3 +43,9 @@ SRC_URI[patch057.md5sum] = "47d98e3e042892495c5efe54ec6e5913"
 SRC_URI[patch057.sha256sum] = "5fc689394d515990f5ea74e2df765fc6e5e42ca44b4591b2c6f9be4b0cadf0f0"
 
 PARALLEL_MAKE = ""
+
+# Fix for buildpaths check
+do_compile_prepend() {
+	oe_runmake y.tab.c
+	sed -i 's,${S}/,,' ${B}/y.tab.c
+}
Signature · 1 line
1.9.1