commit:     561e2d1f884c01d987e8bd812e01c1a29da7f082
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  3 21:16:55 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 12 01:59:55 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=561e2d1f

install-qa-check.d/60pkgconfig: drop ${D} from output; don't repeat ${EPREFIX}

It's confusing when the ebuild has been merged to the system
and we should be consistent with other checks.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/install-qa-check.d/60pkgconfig | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/bin/install-qa-check.d/60pkgconfig 
b/bin/install-qa-check.d/60pkgconfig
index 4c6f01f03..e2d839ca1 100644
--- a/bin/install-qa-check.d/60pkgconfig
+++ b/bin/install-qa-check.d/60pkgconfig
@@ -42,9 +42,12 @@ pkgconfig_check() {
 
                                if [[ ${value} != "${EPREFIX}"* ]] ; then
                                        eqawarn "QA Notice: pkg-config files 
not respecting EPREFIX found"
-                                       eqawarn "${f}'s key=${key} does not 
respect EPREFIX:"
+                                       eqawarn "key=${key} does not respect 
EPREFIX:"
                                        eqawarn "${key}=${value}"
-                                       eqatag -v pkgconfig.bad-paths "${f}"
+                                       eqatag -v pkgconfig.bad-paths 
${key}="${value}" "${f//${D}}"
+
+                                       # Don't bother repeating for every 
variable in the same file
+                                       break
                                fi
                        done
                done
@@ -67,12 +70,12 @@ pkgconfig_check() {
                        fi
 
                        if egrep -q "/lib64" ${f} ; then
-                               bad_libdir+=( ${f} )
+                               bad_libdir+=( "${f//${D}}" )
                        fi
                elif [[ ${f} == *lib64/pkgconfig* ]] ; then
                        # We want to match /lib/, /lib/foo/, but not e.g. 
/lib64 or /lib64/, or libfoo
                        if grep -qP '/lib\b' ${f} ; then
-                               bad_libdir+=( ${f} )
+                               bad_libdir+=( "${f//${D}}" )
                        fi
                fi
        done
@@ -98,7 +101,7 @@ pkgconfig_check() {
                        break
                fi
 
-               bad_file=f
+               bad_file="${f//${D}}"
        done
 
        # Skip result reporting if *_p* because for both _pN and _preN, we

Reply via email to