From: Michał Górny Date: Wed, 10 May 2017 15:23:48 +0000 (+0200) Subject: python-r1.eclass: python_gen_useflags, use _python_impl_matches() X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=b768dbf36b2aeed97440910380ea9f96b5fa1127;p=gentoo.git python-r1.eclass: python_gen_useflags, use _python_impl_matches() --- diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index f337e25337b1..7ec77acd8665 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -324,16 +324,12 @@ python_gen_usedep() { python_gen_useflags() { debug-print-function ${FUNCNAME} "${@}" - local impl pattern - local matches=() + local impl matches=() for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do - for pattern; do - if [[ ${impl} == ${pattern} ]]; then - matches+=( "python_targets_${impl}" ) - break - fi - done + if _python_impl_matches "${impl}" "${@}"; then + matches+=( "python_targets_${impl}" ) + fi done echo "${matches[@]}"