From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S4n51-0002lT-51 for garchives@archives.gentoo.org; Tue, 06 Mar 2012 05:36:59 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CD3EEE0F14; Tue, 6 Mar 2012 05:36:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9F882E0F14 for ; Tue, 6 Mar 2012 05:36:51 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 137521B401F for ; Tue, 6 Mar 2012 05:36:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id D0DB4E5428 for ; Tue, 6 Mar 2012 05:36:49 +0000 (UTC) From: "Paul Varner" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Paul Varner" Message-ID: <1331012015.2b73c56a831e188b1780f0749564dad8af8d13f8.fuzzyray@gentoo> Subject: [gentoo-commits] proj/gentoolkit:gentoolkit commit in: bin/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: bin/euse X-VCS-Directories: bin/ X-VCS-Committer: fuzzyray X-VCS-Committer-Name: Paul Varner X-VCS-Revision: 2b73c56a831e188b1780f0749564dad8af8d13f8 X-VCS-Branch: gentoolkit Date: Tue, 6 Mar 2012 05:36:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: a1e75d3a-5de7-4925-a3ab-45a3b2f53a76 X-Archives-Hash: ee39818fea471d3331368c921ea69ddf commit: 2b73c56a831e188b1780f0749564dad8af8d13f8 Author: Paul Varner gentoo org> AuthorDate: Tue Mar 6 05:33:35 2012 +0000 Commit: Paul Varner gentoo org> CommitDate: Tue Mar 6 05:33:35 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoolkit.gi= t;a=3Dcommit;h=3D2b73c56a Apply patch from Jared Hancock to disable globbing. This patch disables shell globbing except where actually needed. This will hopefully fix bug 382219. --- bin/euse | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/euse b/bin/euse index 1ce2076..9c00cc3 100755 --- a/bin/euse +++ b/bin/euse @@ -1,4 +1,6 @@ #!/bin/bash +# Disable globbing because "-*" and such is valid as a use flag.=20 +set -f =20 # $Header$ =20 @@ -252,6 +254,7 @@ print('\n'.join(['%s %s' % (pkg,' '.join(flgs)) for p= kg,flgs in h.items() if len # 5: ebuild IUSE, 6: use.mask, 7: use.force,=20 # 9: flags indicated active by emerge --info (get_portageuseflags) get_useflags() { + set +f if [[ -z ${ACTIVE_FLAGS[4]} && ( $SCOPE =3D=3D "local" || -z $SCOPE ) ]= ]; then # Parse through /etc/portage/package.use if [[ -d ${PACKAGE_USE_PATH} ]]; then @@ -306,6 +309,7 @@ get_useflags() { | sed -re "/^#.*$/ {d}")) =20 USE_FLAGS_CALCULATED=3D1 + set -f } # }}} =20 # Function: get_portageuseflags # {{{ @@ -398,7 +402,7 @@ get_useflaglist_ebuild() { echo "!!! to generate metadata for your overlays" >&2 return 1 fi - append=3D$(ls $portdir/metadata/cache/${1}-* \ + append=3D$(set +f; ls $portdir/metadata/cache/${1}-* \ | egrep "${1}-[0-9.]+" \ | sed -e "s:$portdir/metadata/cache/${1}-::g" \ | while read -d $'\n' version; do @@ -739,7 +743,6 @@ showdesc() { local found_one local args =09 - set -f args=3D"${*:-*}" =20 if [ -z "${SCOPE}" ]; then @@ -754,7 +757,6 @@ showdesc() { [ "${SCOPE}" =3D=3D "global" ] && echo "global use flags (searching: ${= args})" [ "${SCOPE}" =3D=3D "local" ] && echo "local use flags (searching: ${ar= gs})" echo "************************************************************" - set +f if [ "${args}" =3D=3D "*" ]; then args=3D"${useflags[*]}" fi @@ -1280,11 +1282,8 @@ modify() { =20 ##### main program comes now ##### =20 -# disable globbing as it fucks up with args=3D* -set -f parse_arguments "$@" check_sanity -set +f =20 eval ${MODE} ${ARGUMENTS} =20