commit: 885d12b0f7188fc6558fd8f8e46a83a7a370dc6d Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Tue Nov 18 03:00:35 2025 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Mon Nov 24 22:06:59 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=885d12b0
install-qa-check.d/60pkgconfig: only match lines with known prefix This prevents false positive for compiler lines that can refer to compiler wrappers /usr/lib/ccache for example. Bug: https://bugs.gentoo.org/964413 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> bin/install-qa-check.d/60pkgconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/install-qa-check.d/60pkgconfig b/bin/install-qa-check.d/60pkgconfig index 27df0fb877..74a8397517 100644 --- a/bin/install-qa-check.d/60pkgconfig +++ b/bin/install-qa-check.d/60pkgconfig @@ -84,7 +84,8 @@ pkgconfig_check() { fi elif [[ ${f} == *lib64/pkgconfig* ]] ; then # We want to match /lib/, /lib/foo/, but not e.g. /lib64 or /lib64/, or libfoo - if grep -E -q '=(/usr)?/lib\b' ${f} ; then + # Only check lines with a known prefix in order to avoid false positives + if grep -E -q -e '^libdir=(/usr)?/lib\b' -e '^Libs(\.private)?:.*/lib\b' "${f}" ; then bad_libdir+=( "${f//${D}}" ) fi fi
