Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 800147 - install-qa-check.d/60distutils-use-setuptools false positives on ebuilds with optional distutils
Summary: install-qa-check.d/60distutils-use-setuptools false positives on ebuilds with...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 799848
  Show dependency tree
 
Reported: 2021-07-03 07:19 UTC by Sergei Trofimovich (RETIRED)
Modified: 2021-07-03 08:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2021-07-03 07:19:11 UTC
In bug #799848 =dev-libs/capstone-4.0.2-r2 has USE=python conditional depend on setuptools. QA check fires only when package is built with USE=-python:

dev-libs/capstone $ USE=-python ebuild capstone-4.0.2-r2.ebuild clean install
...
 * QA Notice: DISTUTILS_USE_SETUPTOOLS value is probably incorrect
 *   have:     DISTUTILS_USE_SETUPTOOLS=bdepend (or unset)
 *   expected: DISTUTILS_USE_SETUPTOOLS=no

dev-libs/capstone $ USE=python ebuild capstone-4.0.2-r2.ebuild clean install
<ok>

I think I want something like

--- a/dev-libs/capstone/capstone-4.0.2-r2.ebuild
+++ b/dev-libs/capstone/capstone-4.0.2-r2.ebuild
@@ -52,6 +52,8 @@ src_prepare() {
        tc-export RANLIB
        cmake_src_prepare

+       use python || DISTUTILS_USE_SETUPTOOLS=no
+
        wrap_python ${FUNCNAME}
 }

But the variable is expected to be a pre-inherit:

dev-libs/capstone $ pkgcheck scan .
dev-libs/capstone
  UnstableOnly: for arches: [ amd64, arm, arm64, x86 ], all versions are unstable: [ 4.0.2-r2 ]
  MisplacedEclassVar: version 4.0.2-r2: invalid pre-inherit placement, line 55: 'DISTUTILS_USE_SETUPTOOLS=no'
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-07-03 07:44:17 UTC
DISTUTILS_USE_SETUPTOOLS isn't used at all with DISTUTILS_OPTIONAL.  I'll fix the check not to run if that's the case.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-07-03 08:41:10 UTC
commit 3156d07f30384ec0669d2fdda1a46a83431781e5
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2021-07-03 09:39:47 +0200
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2021-07-03 10:16:25 +0200

    metadata/install-qa-check.d: Skip DUS tests w/ DISTUTILS_OPTIONAL
    
    DISTUTILS_OPTIONAL skips setting the dependency on setuptools entirely,
    so skip checking for its correctness, and verbosely complain if it's
    set.
    
    Closs: https://bugs.gentoo.org/800147
    Signed-off-by: Michał Górny <mgorny@gentoo.org>


Yeah, I know it's spelled 'Kloss'.