diff options
author | fuzzyray <fuzzyray@gentoo.org> | 2010-01-11 16:36:38 +0000 |
---|---|---|
committer | fuzzyray <fuzzyray@gentoo.org> | 2010-01-11 16:36:38 +0000 |
commit | 27c8d3ad61443a2c6c7be892e487cdfac4addcc5 (patch) | |
tree | 0e51e932d4a0feceaa74ab45ca9db7ff8b97c331 /bin/revdep-rebuild | |
parent | Merge genscripts rev 146. This changes the unknown masking status in equery l... (diff) | |
download | gentoolkit-27c8d3ad61443a2c6c7be892e487cdfac4addcc5.tar.gz gentoolkit-27c8d3ad61443a2c6c7be892e487cdfac4addcc5.tar.bz2 gentoolkit-27c8d3ad61443a2c6c7be892e487cdfac4addcc5.zip |
Set environment using 'portageq -v' (Bug 300229)
svn path=/trunk/gentoolkit/; revision=734
Diffstat (limited to 'bin/revdep-rebuild')
-rwxr-xr-x | bin/revdep-rebuild | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/bin/revdep-rebuild b/bin/revdep-rebuild index b6d80e6..ce9e61c 100755 --- a/bin/revdep-rebuild +++ b/bin/revdep-rebuild @@ -985,30 +985,19 @@ show_unowned_files() { # Get multiple portage variables at once to speedup revdep-rebuild. portage_settings() { - local results=() + local ORIG_SEARCH_DIRS="$SEARCH_DIRS" + local ORIG_SEARCH_DIRS_MASK="$SEARCH_DIRS_MASK" + local ORIG_LD_LIBRARY_MASK="$LD_LIBRARY_MASK" + unset SEARCH_DIRS + unset SEARCH_DIRS_MASK + unset LD_LIBRARY_MASK - local query_vars=( - ROOT - PORTAGE_NICENESS - EMERGE_DEFAULT_OPTS - NOCOLOR - SEARCH_DIRS - SEARCH_DIRS_MASK - LD_LIBRARY_MASK - ) - - # one value per line - IFS=$'\n' - results=( $(unset SEARCH_DIRS; unset SEARCH_DIRS_MASK; unset LD_LIBRARY_MASK; portageq envvar ${query_vars[*]}) ) - IFS=$OIFS + eval $(portageq envvar -v PORTAGE_ROOT PORTAGE_NICENESS EMERGE_DEFAULT_OPTS NOCOLOR SEARCH_DIRS SEARCH_DIRS_MASK LD_LIBRARY_MASK) + export NOCOLOR - PORTAGE_ROOT=${results[0]} - PORTAGE_NICENESS=${results[1]} - EMERGE_DEFAULT_OPTS=${results[2]} - export NOCOLOR=${results[3]} - SEARCH_DIRS+=" "${results[4]} - SEARCH_DIRS_MASK+=" "${results[5]} - LD_LIBRARY_MASK+=" "${results[6]} + SEARCH_DIRS="$ORIG_SEARCH_DIRS $SEARCH_DIRS" + SEARCH_DIRS_MASK="$ORIG_SEARCH_DIRS_MASK $SEARCH_DIRS_MASK" + LD_LIBRARY_MASK="$ORIG_LD_LIBRARY_MASK $LD_LIBRARY_MASK" } ## |