Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: PythonHasVersionMissingPythonUseDep should allow PYTHON_SINGLE_USEDEP #696

Open
1 task done
blackteahamburger opened this issue Aug 21, 2024 · 0 comments
Open
1 task done
Labels

Comments

@blackteahamburger
Copy link

blackteahamburger commented Aug 21, 2024

Is there an existing issue for this?

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant