From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 177F715808B for ; Tue, 12 Apr 2022 02:00:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C3843E08CD; Tue, 12 Apr 2022 02:00:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D947DE08CD for ; Tue, 12 Apr 2022 02:00:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 767BD341275 for ; Tue, 12 Apr 2022 02:00:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D76A839F for ; Tue, 12 Apr 2022 02:00:08 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1649728792.6bce6ac4dc87872c112e9f5c5a847acb78ec3d26.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/ X-VCS-Repository: proj/portage X-VCS-Files: bin/install-qa-check.d/60pkgconfig X-VCS-Directories: bin/install-qa-check.d/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6bce6ac4dc87872c112e9f5c5a847acb78ec3d26 X-VCS-Branch: master Date: Tue, 12 Apr 2022 02:00:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a7f6fd5d-eb95-449c-8bab-0aebb7d6a758 X-Archives-Hash: dfae4be7ebf90ca9ee70a12a1b3c2e7f commit: 6bce6ac4dc87872c112e9f5c5a847acb78ec3d26 Author: Sam James gentoo org> AuthorDate: Thu Oct 28 00:37:41 2021 +0000 Commit: Sam James gentoo org> CommitDate: Tue Apr 12 01:59:52 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=6bce6ac4 install-qa-check.d/60pkgconfig: check if paths within .pc respect EPREFIX Seen this problem a few times and it's easy to miss. See: c90ab38e3577aae61fac2341b34ad593948de1cd in ::gentoo Signed-off-by: Sam James gentoo.org> bin/install-qa-check.d/60pkgconfig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/bin/install-qa-check.d/60pkgconfig b/bin/install-qa-check.d/60pkgconfig index 9c4768a95..9e09a1053 100644 --- a/bin/install-qa-check.d/60pkgconfig +++ b/bin/install-qa-check.d/60pkgconfig @@ -26,6 +26,23 @@ pkgconfig_check() { eqawarn "QA Notice: pkg-config files which fail validation found!" eqawarn "Run 'pkg-config --validate ...' for more information" fi + + # Check for unexpected paths + # e.g. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c90ab38e3577aae61fac2341b34ad593948de1cd + if [[ -n ${EPREFIX} ]] ; then + for f in "${files[@]}" ; do + local key + for key in prefix exec_prefix libdir includedir ; do + local value=$(pkg-config --variable="${key}" "${f}") + + 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}=${value}" + fi + done + done + fi } pkgconfig_check