mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-07 18:07:08 -08:00
python*r1.eclass: Reliably allow empty <pattern>s to gen funcs
Reliably allow empty pattern lists (equivalent to no restrictions) in all pattern-based generator functions, notably python_gen_cond_dep. Previously, only some of the functions accepted them while others failed via _python_impl_matches function. Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -252,7 +252,7 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then
|
||||
|
||||
# @FUNCTION: _python_gen_usedep
|
||||
# @INTERNAL
|
||||
# @USAGE: <pattern> [...]
|
||||
# @USAGE: [<pattern>...]
|
||||
# @DESCRIPTION:
|
||||
# Output a USE dependency string for Python implementations which
|
||||
# are both in PYTHON_COMPAT and match any of the patterns passed
|
||||
@@ -327,7 +327,7 @@ python_gen_usedep() {
|
||||
}
|
||||
|
||||
# @FUNCTION: python_gen_useflags
|
||||
# @USAGE: <pattern> [...]
|
||||
# @USAGE: [<pattern>...]
|
||||
# @DESCRIPTION:
|
||||
# Output a list of USE flags for Python implementations which
|
||||
# are both in PYTHON_COMPAT and match any of the patterns passed
|
||||
@@ -364,7 +364,7 @@ python_gen_useflags() {
|
||||
}
|
||||
|
||||
# @FUNCTION: python_gen_cond_dep
|
||||
# @USAGE: <dependency> <pattern> [...]
|
||||
# @USAGE: <dependency> [<pattern>...]
|
||||
# @DESCRIPTION:
|
||||
# Output a list of <dependency>-ies made conditional to USE flags
|
||||
# of Python implementations which are both in PYTHON_COMPAT and match
|
||||
@@ -463,9 +463,8 @@ python_gen_impl_dep() {
|
||||
local PYTHON_REQ_USE=${1}
|
||||
shift
|
||||
|
||||
local patterns=( "${@-*}" )
|
||||
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
|
||||
if _python_impl_matches "${impl}" "${patterns[@]}"; then
|
||||
if _python_impl_matches "${impl}" "${@}"; then
|
||||
local PYTHON_PKG_DEP
|
||||
python_export "${impl}" PYTHON_PKG_DEP
|
||||
matches+=( "python_single_target_${impl}? ( ${PYTHON_PKG_DEP} )" )
|
||||
|
||||
Reference in New Issue
Block a user