commit:     06af67ad303d2f0d8a82c4d6cd4c594d7694689b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  1 02:41:09 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug  1 22:37:51 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=06af67ad

install-qa-check.d: 60pkgconfig: only verify defined variables in EPREFIX check

e.g. 'exec_prefix' might not even appear in the pkg-config file.

Bug: https://bugs.gentoo.org/860825
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/install-qa-check.d/60pkgconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bin/install-qa-check.d/60pkgconfig 
b/bin/install-qa-check.d/60pkgconfig
index d4ba42f5b..6f1d6b8b1 100644
--- a/bin/install-qa-check.d/60pkgconfig
+++ b/bin/install-qa-check.d/60pkgconfig
@@ -38,6 +38,9 @@ pkgconfig_check() {
                for f in "${files[@]}" ; do
                        local key
                        for key in prefix exec_prefix libdir includedir ; do
+                               # Check if the variable is even in there (bug 
#860825)
+                               grep -E -q "^${key}" "${f}" || continue
+
                                local value=$(pkg-config --variable="${key}" 
"${f}")
 
                                if [[ ${value} != "${EPREFIX}"* ]] ; then

Reply via email to