commit: 8ab85ee0b5e4725affcb3bd117add3d875e5246c
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon Aug 8 06:42:11 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 5 11:22:08 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8ab85ee0
10ignored-flags: use test -v instead of ${param-unset}
Wherever there is a need to test whether a variable is set, employ the
[[ ! -v name ]] command to do so. This is supported as of bash-4.2.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/install-qa-check.d/10ignored-flags | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/install-qa-check.d/10ignored-flags
b/bin/install-qa-check.d/10ignored-flags
index 7a92be502b..ec63c5527f 100644
--- a/bin/install-qa-check.d/10ignored-flags
+++ b/bin/install-qa-check.d/10ignored-flags
@@ -43,7 +43,7 @@ ignored_flag_check() {
if [[ -f "${T}"/scanelf-ignored-CFLAGS.log ]] ; then
- if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] ; then
+ if [[ ! -v QA_STRICT_FLAGS_IGNORED ]] ; then
for x in "${QA_FLAGS_IGNORED[@]}" ; do
sed -e "s#^${x#/}\$##" -i
"${T}"/scanelf-ignored-CFLAGS.log
done
@@ -74,7 +74,7 @@ ignored_flag_check() {
<(scanelf -qyRF '#s%p' -s __gentoo_check_ldflags__
"${ED%/}/" | LC_ALL=C sort))
if [[ -n ${f} ]] ; then
echo "${f}" > "${T}"/scanelf-ignored-LDFLAGS.log
- if [ "${QA_STRICT_FLAGS_IGNORED-unset}" = unset ] ; then
+ if [[ ! -v QA_STRICT_FLAGS_IGNORED ]] ; then
for x in "${QA_FLAGS_IGNORED[@]}" ; do
sed -e "s#^${x#/}\$##" -i
"${T}"/scanelf-ignored-LDFLAGS.log
done