From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 0D42513877A for ; Thu, 4 Sep 2014 14:53:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DCD14E08BF; Thu, 4 Sep 2014 14:53:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6C67CE08BF for ; Thu, 4 Sep 2014 14:53:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 067B833FEEE for ; Thu, 4 Sep 2014 14:53:00 +0000 (UTC) Received: by oystercatcher.gentoo.org (Postfix, from userid 2279) id AAB194B1D; Thu, 4 Sep 2014 14:52:58 +0000 (UTC) From: "Michal Gorny (mgorny)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, mgorny@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog python-utils-r1.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: ChangeLog python-utils-r1.eclass X-VCS-Directories: eclass X-VCS-Committer: mgorny X-VCS-Committer-Name: Michal Gorny Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20140904145258.AAB194B1D@oystercatcher.gentoo.org> Date: Thu, 4 Sep 2014 14:52:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 61ee9343-1e7d-4112-a80b-88ed74af707b X-Archives-Hash: 419d5d2f7ec58d617fa70122cf2e9427 mgorny 14/09/04 14:52:58 Modified: ChangeLog python-utils-r1.eclass Log: Preserve all whitespace in shebangs, and add regression test for that. Also, prevent filename expansion when word-splitting it. Bug #522080. Revision Changes Path 1.1366 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1366&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1366&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1365&r2=1.1366 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.1365 retrieving revision 1.1366 diff -u -r1.1365 -r1.1366 --- ChangeLog 4 Sep 2014 14:00:43 -0000 1.1365 +++ ChangeLog 4 Sep 2014 14:52:58 -0000 1.1366 @@ -1,6 +1,11 @@ # ChangeLog for eclass directory # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1365 2014/09/04 14:00:43 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1366 2014/09/04 14:52:58 mgorny Exp $ + + 04 Sep 2014; Michał Górny python-utils-r1.eclass, + tests/python-utils-r1.sh: + Preserve all whitespace in shebangs, and add regression test for that. Also, + prevent filename expansion when word-splitting it. Bug #522080. 04 Sep 2014; Michał Górny tests/python-utils-r1.sh: Fix tests for python_is_python3. 1.61 eclass/python-utils-r1.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-utils-r1.eclass?rev=1.61&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-utils-r1.eclass?rev=1.61&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-utils-r1.eclass?r1=1.60&r2=1.61 Index: python-utils-r1.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- python-utils-r1.eclass 6 Jul 2014 11:45:20 -0000 1.60 +++ python-utils-r1.eclass 4 Sep 2014 14:52:58 -0000 1.61 @@ -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.60 2014/07/06 11:45:20 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.61 2014/09/04 14:52:58 mgorny Exp $ # @ECLASS: python-utils-r1 # @MAINTAINER: @@ -960,13 +960,16 @@ local shebang i local error= from= - read shebang <"${f}" + IFS= read -r shebang <${f} # First, check if it's shebang at all... if [[ ${shebang} == '#!'* ]]; then + local split_shebang=() + read -r -a split_shebang <<<${shebang} + # Match left-to-right in a loop, to avoid matching random # repetitions like 'python2.7 python2'. - for i in ${shebang}; do + for i in "${split_shebang[@]}"; do case "${i}" in *"${EPYTHON}") debug-print "${FUNCNAME}: in file ${f#${D}}"