eclass: Accept one parameter only

It's backported from gentoo, some newer packages in gentoo started to
use python_gen_cond_dep with one parameter only, so when we updated
them in portage stable, we don't want them to fail to build.
This commit is contained in:
Krzesimir Nowak 2021-09-09 09:34:54 +02:00
parent 2eb1ab3779
commit f0b36f19e1

View File

@ -176,7 +176,8 @@ _python_set_impls() {
# b) '-2' to indicate all Python 2 variants (= !python_is_python3)
# c) '-3' to indicate all Python 3 variants (= python_is_python3)
_python_impl_matches() {
[[ ${#} -ge 2 ]] || die "${FUNCNAME}: takes at least 2 parameters"
[[ ${#} -ge 1 ]] || die "${FUNCNAME}: takes at least 1 parameter"
[[ ${#} -eq 1 ]] && return 0
local impl=${1} pattern
shift