python-r1.eclass: python_gen_cond_dep(), rename local PYTHON_USEDEP
authorMichał Górny <mgorny@gentoo.org>
Sun, 6 Dec 2015 16:52:38 +0000 (17:52 +0100)
committerMichał Górny <mgorny@gentoo.org>
Wed, 9 Dec 2015 20:41:16 +0000 (21:41 +0100)
Rename local PYTHON_USEDEP variable to avoid collisions with read-only
global variable.

eclass/python-r1.eclass

index 22030b950d1786777022aed95fd11fd53167b29f..8c58e310547a932e46175fd68847825d1b4fcb0d 100644 (file)
@@ -390,8 +390,8 @@ python_gen_cond_dep() {
                                # (since python_gen_usedep() will not return ${PYTHON_USEDEP}
                                #  the code is run at most once)
                                if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then
-                                       local PYTHON_USEDEP=$(python_gen_usedep "${@}")
-                                       dep=${dep//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
+                                       local usedep=$(python_gen_usedep "${@}")
+                                       dep=${dep//\$\{PYTHON_USEDEP\}/${usedep}}
                                fi
 
                                matches+=( "python_targets_${impl}? ( ${dep} )" )