pkgcheck
pkgcheck copied to clipboard
[Bug]: PythonHasVersionMissingPythonUseDep should allow PYTHON_SINGLE_USEDEP
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
inherit python-any-r1
...
BDEPEND="
${PYTHON_DEPS}
$(python_gen_any_dep '
dev-python/pypinyin[${PYTHON_USEDEP}]
app-i18n/opencc[python,${PYTHON_SINGLE_USEDEP}]
')
"
python_check_deps() {
python_has_version "dev-python/pypinyin[${PYTHON_USEDEP}]" &&
python_has_version "app-i18n/opencc[python,${PYTHON_SINGLE_USEDEP}]"
}
causes:
PythonAnyMismatchedDepHasVersionCheck: version 0.2.5.20240722: BDEPEND: missing check for dev-python/pypinyin[${PYTHON_USEDEP}] in 'python_gen_any_dep'
PythonHasVersionMissingPythonUseDep: version 0.2.5.20240722: line: 46: missing [${PYTHON_USEDEP}] suffix for argument 'app-i18n/opencc[python,${PYTHON_SINGLE_USEDEP}]'
Expected Behavior
This should be correct, without any report.
Example use in Devmanual:
BDEPEND="$(python_gen_any_dep '
dev-python/foo[${PYTHON_SINGLE_USEDEP}]
|| ( dev-python/bar[${PYTHON_USEDEP}]
dev-python/baz[${PYTHON_USEDEP}] )')"
python_check_deps() {
python_has_version "dev-python/foo[${PYTHON_SINGLE_USEDEP}]" &&
{ python_has_version "dev-python/bar[${PYTHON_USEDEP}]" ||
python_has_version "dev-python/baz[${PYTHON_USEDEP}]"; }
}
PYTHON_SINGLE_USEDEP (GENERATED BY ECLASS) An eclass-generated USE-dependency string for the currently tested implementation. It is set locally for python_check_deps() call. The generated USE-flag list is compatible with packages using python-single-r1 eclass. For python-r1 dependencies, use PYTHON_USEDEP.
Example use:
python_check_deps() {
python_has_version "dev-python/bar[${PYTHON_SINGLE_USEDEP}]"
}
pkgcheck version
pkgcheck 0.10.30
pkgcore version
pkgcore 0.12.27