• [gentoo-dev] [PATCH 4/9] install-qa-check.d/60python-site: Add bad vers

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Sat Jan 6 14:50:01 2024
    This was a case e.g. with =dev-python/pyrqlite-2.2.0.

    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    metadata/install-qa-check.d/60python-site | 21 +++++++++++++++++++++
    1 file changed, 21 insertions(+)

    diff --git a/metadata/install-qa-check.d/60python-site b/metadata/install-qa-check.d/60python-site
    index 459509f8a136..a54dda53a454 100644
    --- a/metadata/install-qa-check.d/60python-site
    +++ b/metadata/install-qa-check.d/60python-site
    @@ -24,6 +24,7 @@ python_site_check() {
    local missing=()
    local stray=()

    + local bad_versions=()
    local stray_packages=()

    # Avoid running the check if sufficiently new gpep517 is not installed @@ -42,6 +43,18 @@ python_site_check() {
    local sitedir=( "${ED}"/usr/lib/${impl}*/site-packages )
    [[ -d ${sitedir} ]] || continue

    + # check for bad package versions
    + while IFS= read -d $'\0' -r f; do
    + bad_versions+=( "${f#${ED}}" )
    + done < <(
    + find "${sitedir}" -maxdepth 1 '(' \
    + -name '*-0.0.0.dist-info' -o \
    + -name '*-UNKNOWN.dist-info' -o \
    + -name '*-0.0.0.egg-info' -o \
    + -name '*-UNKNOWN.egg-info' \
    + ')'