Don't change the shell options to Portage, or it will fail. Closes bug #160339.
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Sat, 6 Jan 2007 16:00:22 +0000 (16:00 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Sat, 6 Jan 2007 16:00:22 +0000 (16:00 +0000)
eclass/ruby.eclass

index 9937a16e4d5a2ebe33151ba816e4053f50679ac0..8a2d4a52abac0aa469c050f4657702112378940c 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby.eclass,v 1.55 2006/12/04 22:05:53 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby.eclass,v 1.56 2007/01/06 16:00:22 flameeyes Exp $
 #
 # Author: Mamoru KOMACHI <usata@gentoo.org>
 #
@@ -228,7 +228,8 @@ prepall() {
        elif [ "${USE_RUBY}" == "any" ] ; then
                siteruby=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]')
                # in case no directories found in siteruby
-               shopt -sq nullglob
+               local shopts=$-
+               set -o noglob # so that bash doen't expand "*"
 
                for x in ${D}/${siteruby}/* ; do
                        mv $x ${D}/${siteruby}/..
@@ -236,6 +237,8 @@ prepall() {
                if [ -d ${D}${siteruby} ] ; then
                        rmdir --ignore-fail-on-non-empty ${D}/${siteruby}
                fi
+
+               set +noglob; set -$shopts # reset old shell opts
        fi
 
        prepallman