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 6986D15803E for ; Sat, 6 Jan 2024 13:46:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B7DA72BC0F0; Sat, 6 Jan 2024 13:44:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 625892BC0E8 for ; Sat, 6 Jan 2024 13:44:59 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 6/9] install-qa-check.d/60python-site: Add check for wrong libdir Date: Sat, 6 Jan 2024 14:44:43 +0100 Message-ID: <20240106134446.26153-6-mgorny@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240106134446.26153-1-mgorny@gentoo.org> References: <20240106134446.26153-1-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 438f77d9-126d-4d47-85cd-f137801706a0 X-Archives-Hash: 64178a16012b7d350e954b5f0c078f7e Bug: https://bugs.gentoo.org/702016 Bug: https://bugs.gentoo.org/770961 Signed-off-by: Michał Górny --- metadata/install-qa-check.d/60python-site | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/metadata/install-qa-check.d/60python-site b/metadata/install-qa-check.d/60python-site index 3fd697605a70..facc41fbb060 100644 --- a/metadata/install-qa-check.d/60python-site +++ b/metadata/install-qa-check.d/60python-site @@ -9,6 +9,10 @@ python_site_check() { local save=$(shopt -p nullglob) shopt -s nullglob local progs=( "${EPREFIX}"/usr/lib/python-exec/*/gpep517 ) + local bad_libdirs=() + [[ $(get_libdir) != lib ]] && bad_libdirs=( + "${ED}/usr/$(get_libdir)"/{python3,pypy}* + ) ${save} local forbidden_package_names=( @@ -183,6 +187,14 @@ python_site_check() { eqawarn "https://projects.gentoo.org/python/guide/qawarn.html#stray-top-level-files-in-site-packages" die "Failing install because of stray top-level files in site-packages" fi + + if [[ ${bad_libdirs[@]} ]]; then + eqawarn + eqawarn "QA Notice: Package installs Python files to /usr/$(get_libdir)" + eqawarn "instead of /usr/lib (use \$(python_get_sitedir)):" + eqawarn + eqatag -v python-site.libdir "${bad_libdirs[@]#${ED}}" + fi } python_site_check -- 2.43.0