From: Xiangyu Chen <xiangyu.c...@windriver.com> GNU grep started to output error messages in v3.8 (see below) for egrep, those error messages also records in test log, that cause test case failure in diff stage.
error message from egrep: egrep: warning: egrep is obsolescent; using grep -E The bug and a patch has been sent to bash bug-report maillist[1], and got an ack from maintainer, but not merged/fixed on bash master repository yet. Ref: [1] https://lists.gnu.org/archive/html/bug-bash/2024-02/msg00154.html Signed-off-by: Xiangyu Chen <xiangyu.c...@windriver.com> --- ...ests-using-grep-v-e-instead-of-egrep.patch | 100 ++++++++++++++++++ meta/recipes-extended/bash/bash_5.2.21.bb | 1 + 2 files changed, 101 insertions(+) create mode 100644 meta/recipes-extended/bash/bash/0001-tests-array.tests-using-grep-v-e-instead-of-egrep.patch diff --git a/meta/recipes-extended/bash/bash/0001-tests-array.tests-using-grep-v-e-instead-of-egrep.patch b/meta/recipes-extended/bash/bash/0001-tests-array.tests-using-grep-v-e-instead-of-egrep.patch new file mode 100644 index 0000000000..6f96b4215d --- /dev/null +++ b/meta/recipes-extended/bash/bash/0001-tests-array.tests-using-grep-v-e-instead-of-egrep.patch @@ -0,0 +1,100 @@ +From 423c45a41f044e06857a5a893187e65d46d8ad53 Mon Sep 17 00:00:00 2001 +From: Xiangyu Chen <xiangyu.c...@windriver.com> +Date: Tue, 20 Feb 2024 02:54:55 +0000 +Subject: [PATCH] tests/array.tests: using grep -v -e instead of egrep + +The console ouput lots of egrep warning message, those message causes test case fail in diff stage. +According the message, using grep -v -e instead of egrep. + +Warning message: +--------------- +9d8 +< egrep: warning: egrep is obsolescent; using grep -E +31d29 +< egrep: warning: egrep is obsolescent; using grep -E +34d31 +< egrep: warning: egrep is obsolescent; using grep -E +37d33 +< egrep: warning: egrep is obsolescent; using grep -E +41d36 +< egrep: warning: egrep is obsolescent; using grep -E +65d59 +< egrep: warning: egrep is obsolescent; using grep -E +84d77 +< egrep: warning: egrep is obsolescent; using grep -E +--------------- + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-bash/2024-02/msg00154.html] + +Signed-off-by: Xiangyu Chen <xiangyu.c...@windriver.com> +--- + tests/array.tests | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/tests/array.tests b/tests/array.tests +index d0bb08b..07452ec 100644 +--- a/tests/array.tests ++++ b/tests/array.tests +@@ -16,7 +16,7 @@ + set +o posix + + set +a +-# The calls to egrep -v are to filter out builtin array variables that are ++# The calls to grep -v -e are to filter out builtin array variables that are + # automatically set and possibly contain values that vary. + + # first make sure we handle the basics +@@ -61,7 +61,7 @@ echo ${a[@]} + echo ${a[*]} + + # this should print out values, too +-declare -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' ++declare -a | grep -v -e BASH_VERSINFO -e PIPESTATUS -e GROUPS + + unset a[7] + echo ${a[*]} +@@ -92,11 +92,11 @@ echo ${a[@]} + readonly a[5] + readonly a + # these two lines should output `declare' commands +-readonly -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' +-declare -ar | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' ++readonly -a | grep -v -e BASH_VERSINFO -e PIPESTATUS -e GROUPS ++declare -ar | grep -v -e BASH_VERSINFO -e PIPESTATUS -e GROUPS + # this line should output `readonly' commands, even for arrays + set -o posix +-readonly -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' ++readonly -a | grep -v -e BASH_VERSINFO -e PIPESTATUS -e GROUPS + set +o posix + + declare -a d='([1]="" [2]="bdef" [5]="hello world" "test")' +@@ -111,7 +111,7 @@ b=([0]=this [1]=is [2]=a [3]=test [4]="$PS1" [5]=$pass) + + echo ${b[@]:2:3} + +-declare -pa | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' ++declare -pa | grep -v -e BASH_VERSINFO -e PIPESTATUS -e GROUPS + + a[3]="this is a test" + +@@ -129,7 +129,7 @@ d=([]=abcde [1]="test test" [*]=last [-65]=negative ) + unset d[12] + unset e[*] + +-declare -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' ++declare -a | grep -v -e BASH_VERSINFO -e PIPESTATUS -e GROUPS + + ps1='hello' + unset ps1[2] +@@ -155,7 +155,7 @@ echo ${vv[0]} ${vv[3]} + echo ${vv[@]} + unset vv + +-declare -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)' ++declare -a | grep -v -e BASH_VERSINFO -e PIPESTATUS -e GROUPS + + export rv + #set +-- +2.35.5 + diff --git a/meta/recipes-extended/bash/bash_5.2.21.bb b/meta/recipes-extended/bash/bash_5.2.21.bb index 46d921bbe6..18b821a29b 100644 --- a/meta/recipes-extended/bash/bash_5.2.21.bb +++ b/meta/recipes-extended/bash/bash_5.2.21.bb @@ -13,6 +13,7 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \ file://fix-run-builtins.patch \ file://use_aclocal.patch \ file://0001-changes-to-SIGINT-handler-while-waiting-for-a-child-.patch \ + file://0001-tests-array.tests-using-grep-v-e-instead-of-egrep.patch \ " SRC_URI[tarball.sha256sum] = "c8e31bdc59b69aaffc5b36509905ba3e5cbb12747091d27b4b977f078560d5b8" -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#196245): https://lists.openembedded.org/g/openembedded-core/message/196245 Mute This Topic: https://lists.openembedded.org/mt/104599699/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-