From: fuzzyray Date: Mon, 11 Jan 2010 16:36:38 +0000 (-0000) Subject: Set environment using 'portageq -v' (Bug 300229) X-Git-Tag: gentoolkit-0.3.0_rc10~20 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=27c8d3ad61443a2c6c7be892e487cdfac4addcc5;p=gentoolkit.git Set environment using 'portageq -v' (Bug 300229) svn path=/trunk/gentoolkit/; revision=734 --- diff --git a/ChangeLog b/ChangeLog index c68aef3..00b0b33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2009-01-11: Paul Varner + * revdep-rebuild: Set environment using 'portageq -v' (Bug 300229) + 2009-01-08: Paul Varner * epkginfo/equery: Fix expkinfo to not traceback if herds.xml is not present in the tree. (Bug 300108) 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" } ##