diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-11-09 10:48:36 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-11-09 10:48:36 -0800 |
commit | f75d02eb630c5595127faded4a048268ff59ac17 (patch) | |
tree | c7e9698e65a73ef3be8ec3c08fca26566a990eb4 /bin/misc-functions.sh | |
parent | 27a9aec2a725066bd4585baab252eae5110f6b58 (diff) | |
download | portage-f75d02eb630c5595127faded4a048268ff59ac17.tar.gz portage-f75d02eb630c5595127faded4a048268ff59ac17.tar.bz2 portage-f75d02eb630c5595127faded4a048268ff59ac17.zip |
Use local EPREFIX for uniformity.
The EPREFIX variable is not readonly in EAPI 0, 1, and 2, so we can
declare EPREFIX as a local variable. We must be careful not to let this
variable leak into the environment of ebuild/eclass functions that we
call, since bash propagates local variables to nested function calls.
Diffstat (limited to 'bin/misc-functions.sh')
-rwxr-xr-x | bin/misc-functions.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index b1f47366d..1c11dc51a 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -1097,13 +1097,12 @@ __END1__ dyn_rpm() { - local eprefix=${EPREFIX} - case "$EAPI" in 0|1|2) eprefix= ;; esac + case "$EAPI" in 0|1|2) local EPREFIX= ;; esac cd "${T}" || die "cd failed" local machine_name=$(uname -m) - local dest_dir=${eprefix}/usr/src/rpm/RPMS/${machine_name} - addwrite ${eprefix}/usr/src/rpm + local dest_dir=${EPREFIX}/usr/src/rpm/RPMS/${machine_name} + addwrite ${EPREFIX}/usr/src/rpm addwrite "${RPMDIR}" dyn_spec rpmbuild -bb --clean --rmsource "${PF}.spec" || die "Failed to integrate rpm spec file" |