diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-01-05 16:52:16 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-01-08 15:48:19 +0100 |
commit | 6f05bc88c81a42943e5784736d2eb15f63c5ef40 (patch) | |
tree | 2220d39d8f7c3a94c96529c719edaf9205ea7128 /metadata | |
parent | install-qa-check.d/60python-site: Forbid lib & usr package names (diff) | |
download | gentoo-6f05bc88c81a42943e5784736d2eb15f63c5ef40.tar.gz gentoo-6f05bc88c81a42943e5784736d2eb15f63c5ef40.tar.bz2 gentoo-6f05bc88c81a42943e5784736d2eb15f63c5ef40.zip |
install-qa-check.d/60python-site: Add check for wrong libdir
Bug: https://bugs.gentoo.org/702016
Bug: https://bugs.gentoo.org/770961
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'metadata')
-rw-r--r-- | metadata/install-qa-check.d/60python-site | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/metadata/install-qa-check.d/60python-site b/metadata/install-qa-check.d/60python-site index 3ac1dc91669e..ffc06edf0960 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=( @@ -185,6 +189,14 @@ python_site_check() { # the previous version from distutils-r1 #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 |