diff options
author | Michał Górny <mgorny@gentoo.org> | 2014-05-16 07:54:40 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2014-05-16 07:54:40 +0000 |
commit | 3ab497a5c739df66495887a8b26c92e2d7c5dd4f (patch) | |
tree | 537c71b96432f44af079af806c4aaddef1432581 /eclass | |
parent | Remove old. (diff) | |
download | gentoo-2-3ab497a5c739df66495887a8b26c92e2d7c5dd4f.tar.gz gentoo-2-3ab497a5c739df66495887a8b26c92e2d7c5dd4f.tar.bz2 gentoo-2-3ab497a5c739df66495887a8b26c92e2d7c5dd4f.zip |
Accept files with already-rewritten shebangs in _python_rewrite_shebang. Necessary for proper python_doscript().
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/python-utils-r1.eclass | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index d1de650e308a..df612f086da5 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -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.1254 2014/05/15 05:18:33 rhill Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1255 2014/05/16 07:54:40 mgorny Exp $ + + 16 May 2014; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass: + Accept files with already-rewritten shebangs in _python_rewrite_shebang. + Necessary for proper python_doscript(). 15 May 2014; Ryan Hill <rhill@gentoo.org> toolchain.eclass: Allow parallel profiledbootstrap in newer versions (bug #508878 by Eric F. diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index bc3338eb72e8..81d6691d86ed 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -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-utils-r1.eclass,v 1.54 2014/05/01 13:34:02 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.55 2014/05/16 07:54:40 mgorny Exp $ # @ECLASS: python-utils-r1 # @MAINTAINER: @@ -522,7 +522,10 @@ _python_rewrite_shebang() { debug-print "${FUNCNAME}: path = ${f}" debug-print "${FUNCNAME}: shebang = ${shebang}" - if [[ "${shebang} " == *'python '* ]]; then + if [[ "${shebang} " == *"${impl} "* ]]; then + # skip files with correct impl + continue + elif [[ "${shebang} " == *'python '* ]]; then from=python elif [[ "${shebang} " == *'python2 '* ]]; then from=python2 |