• [gentoo-dev] [PATCH 6/9] install-qa-check.d/60python-site: Add check fo

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Sat Jan 6 14:50:01 2024
    Bug: https://bugs.gentoo.org/702016
    Bug: https://bugs.gentoo.org/770961
    Signed-off-by: Michał Górny <[email protected]>
    ---
    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_lib