summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-05-16 07:54:40 +0000
committerMichał Górny <mgorny@gentoo.org>2014-05-16 07:54:40 +0000
commit3ab497a5c739df66495887a8b26c92e2d7c5dd4f (patch)
tree537c71b96432f44af079af806c4aaddef1432581 /eclass/python-utils-r1.eclass
parentRemove old. (diff)
downloadgentoo-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/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass7
1 files changed, 5 insertions, 2 deletions
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