mgorny      14/07/06 14:41:17

  Modified:             ChangeLog python-r1.eclass
  Log:
  python_gen_cond_dep: delay PYTHON_USEDEP substitution until one of the 
implementations is actually enabled. Fixes bug #516520.

Revision  Changes    Path
1.1312               eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1312&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1312&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1311&r2=1.1312

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1311
retrieving revision 1.1312
diff -u -r1.1311 -r1.1312
--- ChangeLog   6 Jul 2014 11:45:20 -0000       1.1311
+++ ChangeLog   6 Jul 2014 14:41:17 -0000       1.1312
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1311 2014/07/06 
11:45:20 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1312 2014/07/06 
14:41:17 mgorny Exp $
+
+  06 Jul 2014; Michał Górny <[email protected]> python-r1.eclass:
+  python_gen_cond_dep: delay PYTHON_USEDEP substitution until one of the
+  implementations is actually enabled. Fixes bug #516520.
 
   06 Jul 2014; Michał Górny <[email protected]> python-utils-r1.eclass:
   Disable python2.6 support and clean up the related code.



1.75                 eclass/python-r1.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.75&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?rev=1.75&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-r1.eclass?r1=1.74&r2=1.75

Index: python-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- python-r1.eclass    19 Jun 2014 08:08:10 -0000      1.74
+++ python-r1.eclass    6 Jul 2014 14:41:17 -0000       1.75
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.74 2014/06/19 
08:08:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.75 2014/07/06 
14:41:17 mgorny Exp $
 
 # @ECLASS: python-r1
 # @MAINTAINER:
@@ -368,17 +368,19 @@
        local dep=${1}
        shift
 
-       # substitute ${PYTHON_USEDEP} if used
-       if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then
-               local PYTHON_USEDEP=$(python_gen_usedep "${@}")
-               dep=${dep//\$\{PYTHON_USEDEP\}/${PYTHON_USEDEP}}
-       fi
-
        for impl in "${PYTHON_COMPAT[@]}"; do
                _python_impl_supported "${impl}" || continue
 
                for pattern; do
                        if [[ ${impl} == ${pattern} ]]; then
+                               # substitute ${PYTHON_USEDEP} if used
+                               # (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}}
+                               fi
+
                                matches+=( "python_targets_${impl}? ( ${dep} )" 
)
                                break
                        fi




Reply via email to