public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Paul Varner" <fuzzyray@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:gentoolkit commit in: bin/
Date: Tue,  6 Mar 2012 05:36:49 +0000 (UTC)	[thread overview]
Message-ID: <1331012015.2b73c56a831e188b1780f0749564dad8af8d13f8.fuzzyray@gentoo> (raw)

commit:     2b73c56a831e188b1780f0749564dad8af8d13f8
Author:     Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  6 05:33:35 2012 +0000
Commit:     Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Tue Mar  6 05:33:35 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=2b73c56a

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. 
+set -f
 
 # $Header$
 
@@ -252,6 +254,7 @@ print('\n'.join(['%s %s' % (pkg,' '.join(flgs)) for pkg,flgs in h.items() if len
 # 5: ebuild IUSE, 6: use.mask, 7: use.force, 
 # 9: flags indicated active by emerge --info (get_portageuseflags)
 get_useflags() {
+	set +f
 	if [[ -z ${ACTIVE_FLAGS[4]} && ( $SCOPE == "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}"))
 
 	USE_FLAGS_CALCULATED=1
+	set -f
 } # }}}
 
 # Function: get_portageuseflags # {{{
@@ -398,7 +402,7 @@ get_useflaglist_ebuild() {
 			echo "!!! to generate metadata for your overlays" >&2
 			return 1
 		fi
-		append=$(ls $portdir/metadata/cache/${1}-* \
+		append=$(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
 	
-	set -f
 	args="${*:-*}"
 
 	if [ -z "${SCOPE}" ]; then
@@ -754,7 +757,6 @@ showdesc() {
 	[ "${SCOPE}" == "global" ] && echo "global use flags (searching: ${args})"
 	[ "${SCOPE}" == "local" ] && echo "local use flags (searching: ${args})"
 	echo "************************************************************"
-	set +f
 	if [ "${args}" == "*" ]; then
 		args="${useflags[*]}"
 	fi
@@ -1280,11 +1282,8 @@ modify() {
 
 ##### main program comes now #####
 
-# disable globbing as it fucks up with args=*
-set -f
 parse_arguments "$@"
 check_sanity
-set +f
 
 eval ${MODE} ${ARGUMENTS}
 



             reply	other threads:[~2012-03-06  5:36 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06  5:36 Paul Varner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-06-02 19:32 [gentoo-commits] proj/gentoolkit:gentoolkit commit in: bin/ Paul Varner
2015-04-23 21:20 Paul Varner
2015-01-23 21:22 Paul Varner
2014-10-24 18:02 Paul Varner
2014-03-06 16:39 Paul Varner
2014-02-12 10:22 Brian Dolbec
2013-11-20 20:38 Vikraman Choudhury
2013-11-20  2:34 Paul Varner
2013-11-05 17:24 Paul Varner
2013-09-10 23:03 Paul Varner
2013-09-10 18:53 Paul Varner
2013-09-10 16:01 Paul Varner
2013-09-04 21:44 Paul Varner
2013-08-29 17:37 Paul Varner
2013-07-08 19:20 Paul Varner
2012-09-26  6:13 Paul Varner
2012-06-20 17:17 Paul Varner
2012-06-20 17:17 Paul Varner
2012-05-16 22:31 Paul Varner
2012-04-11 18:50 Paul Varner
2012-04-11 17:42 Paul Varner
2012-03-20  4:04 Paul Varner
2012-02-28 21:44 Paul Varner
2012-02-20 23:25 Paul Varner
2012-02-20 23:25 Paul Varner
2012-02-16 17:37 Paul Varner
2011-11-28 15:46 Paul Varner
2011-10-12 16:39 Paul Varner
2011-09-07 12:40 Christian Ruppert
2011-08-24 17:30 Paul Varner
2011-07-27 19:02 Paul Varner
2011-07-13 16:01 Paul Varner
2011-07-13 15:41 Paul Varner
2011-07-12 21:45 Paul Varner
2011-05-29 10:59 Christian Ruppert
2011-05-25  1:02 Paul Varner
2011-05-23 21:28 Paul Varner
2011-05-12  2:55 Paul Varner
2011-05-11  2:06 Paul Varner
2011-05-11  0:43 Paul Varner
2011-04-24  0:59 Brian Dolbec
2011-03-29  2:18 Paul Varner
2011-02-25 16:50 Paul Varner
2011-02-25 16:50 Paul Varner
2011-02-25 16:50 Paul Varner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331012015.2b73c56a831e188b1780f0749564dad8af8d13f8.fuzzyray@gentoo \
    --to=fuzzyray@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox