diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-04-07 08:52:46 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-04-07 08:52:46 +0000 |
commit | e12b6a2df1810b088105d609bdbfc2e727ca0457 (patch) | |
tree | 1cae7713381bf4b90b28571622d6e21914f6d7c3 /eclass | |
parent | stable amd64, bug 169830 (diff) | |
download | gentoo-2-e12b6a2df1810b088105d609bdbfc2e727ca0457.tar.gz gentoo-2-e12b6a2df1810b088105d609bdbfc2e727ca0457.tar.bz2 gentoo-2-e12b6a2df1810b088105d609bdbfc2e727ca0457.zip |
replace INSDESTTREE/INSOPTIONS with subshells and insinto/insopts
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/freebsd.eclass | 10 | ||||
-rw-r--r-- | eclass/games.eclass | 16 | ||||
-rw-r--r-- | eclass/java-utils-2.eclass | 12 | ||||
-rw-r--r-- | eclass/pam.eclass | 36 | ||||
-rw-r--r-- | eclass/ruby.eclass | 11 |
5 files changed, 51 insertions, 34 deletions
diff --git a/eclass/freebsd.eclass b/eclass/freebsd.eclass index 39042fe158b6..1806eaa4442d 100644 --- a/eclass/freebsd.eclass +++ b/eclass/freebsd.eclass @@ -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/freebsd.eclass,v 1.11 2006/11/22 11:21:37 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/freebsd.eclass,v 1.12 2007/04/07 08:52:46 vapier Exp $ # # Diego Pettenò <flameeyes@gentoo.org> @@ -42,9 +42,11 @@ doperiodic() { local kind=$1 shift - INSDESTTREE="/etc/periodic/${kind}" - INSOPTIONS="-m 0755" \ - doins "$@" + ( # dont want to pollute calling env + insinto /etc/periodic/${kind} + insopts -m 0755 + doins "$@" + ) } freebsd_get_bmake() { diff --git a/eclass/games.eclass b/eclass/games.eclass index 403220116693..a1f98e1d1925 100644 --- a/eclass/games.eclass +++ b/eclass/games.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.120 2007/03/27 01:48:01 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.121 2007/04/07 08:52:46 vapier Exp $ # devlist: {vapier,wolf31o2,mr_bones_}@gentoo.org -> games@gentoo.org # @@ -63,13 +63,13 @@ egamesinstall() { } gameswrapper() { - local oldtree=${DESTTREE} - into "${GAMES_PREFIX}" - local cmd=$1; shift - ${cmd} "$@" - local ret=$? - into "${oldtree}" - return ${ret} + # dont want to pollute calling env + ( + into "${GAMES_PREFIX}" + cmd=$1 + shift + ${cmd} "$@" + ) } dogamesbin() { gameswrapper ${FUNCNAME/games} "$@"; } diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 635236ab34f1..8545b9eb4123 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -6,7 +6,7 @@ # # Licensed under the GNU General Public License, v2 # -# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.68 2007/03/25 10:02:09 betelgeuse Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.69 2007/04/07 08:52:46 vapier Exp $ # ----------------------------------------------------------------------------- @@ -208,9 +208,15 @@ java-pkg_doexamples() { local dest=/usr/share/doc/${PF}/examples if [[ ${#} = 1 && -d ${1} ]]; then - INSDESTTREE="${dest}" doins -r ${1}/* || die "Installing examples failed" + ( # dont want to pollute calling env + insinto "${dest}" + doins -r ${1}/* + ) || die "Installing examples failed" else - INSDESTTREE="${dest}" doins -r "${@}" || die "Installing examples failed" + ( # dont want to pollute calling env + insinto "${dest}" + doins -r "$@" + ) || die "Installing examples failed" fi } diff --git a/eclass/pam.eclass b/eclass/pam.eclass index 1f886f786981..50d265264df5 100644 --- a/eclass/pam.eclass +++ b/eclass/pam.eclass @@ -1,7 +1,7 @@ # Copyright 2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later # Author Diego Pettenò <flameeyes@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.10 2005/11/03 21:27:02 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.11 2007/04/07 08:52:46 vapier Exp $ # # This eclass contains functions to install pamd configuration files and # pam modules. @@ -18,9 +18,11 @@ dopamd() { return 0; fi - INSDESTTREE=/etc/pam.d \ - INSOPTIONS="-m 0644" \ - doins "$@" || die "failed to install $@" + ( # dont want to pollute calling env + insinto /etc/pam.d + insopts -m 0644 + doins "$@" + ) || die "failed to install $@" cleanpamd "$@" } @@ -34,9 +36,11 @@ newpamd() { return 0; fi - INSDESTTREE=/etc/pam.d \ - INSOPTIONS="-m 0644" \ - newins "$1" "$2" || die "failed to install $1 as $2" + ( # dont want to pollute calling env + insinto /etc/pam.d + insopts -m 0644 + newins "$1" "$2" + ) || die "failed to install $1 as $2" cleanpamd $2 } @@ -47,12 +51,14 @@ dopamsecurity() { [[ $# -lt 2 ]] && die "dopamsecurity requires at least two arguments" if hasq pam ${IUSE} && ! use pam; then - return 0; + return 0 fi - INSDESTTREE=/etc/security/$1 \ - INSOPTIONS="-m 0644" \ - doins "${@:2}" || die "failed to install ${@:2}" + ( # dont want to pollute calling env + insinto /etc/security/$1 + insopts -m 0644 + doins "${@:2}" + ) || die "failed to install ${@:2}" } # newpamsecurity <section> <old name> <new name> @@ -65,9 +71,11 @@ newpamsecurity() { return 0; fi - INSDESTTREE=/etc/security/$1 \ - INSOPTIONS="-m 0644" \ - newins "$2" "$3" || die "failed to install $2 as $3" + ( # dont want to pollute calling env + insinto /etc/security/$1 + insopts -m 0644 + newins "$2" "$3" + ) || die "failed to install $2 as $3" } # getpam_mod_dir diff --git a/eclass/ruby.eclass b/eclass/ruby.eclass index 352ffc7f7288..e0eaf0e4da8b 100644 --- a/eclass/ruby.eclass +++ b/eclass/ruby.eclass @@ -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.63 2007/03/10 10:27:45 rbrown Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ruby.eclass,v 1.64 2007/04/07 08:52:46 vapier Exp $ # # Author: Mamoru KOMACHI <usata@gentoo.org> # @@ -123,16 +123,17 @@ ruby_emake() { } ruby_src_compile() { - # You can pass configure options via RUBY_ECONF ruby_econf || die ruby_emake "$@" || die } doruby() { - INSDESTTREE="$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')" \ - INSOPTIONS="-m 0644" \ - doins "$@" || die "failed to install $@" + ( # dont want to pollute calling env + insinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]') + insopts -m 0644 + doins "$@" + ) || die "failed to install $@" } ruby_einstall() { |