From: fuzzyray Date: Sat, 16 Feb 2008 20:51:01 +0000 (-0000) Subject: Filter SEARCH_DIRS_MASK paths from SEARCH_DIRS. (Bug 194993) X-Git-Tag: gentoolkit-0.2.4.3~52 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=058422e807e126d8d50649a7e6125332a6717902;p=gentoolkit.git Filter SEARCH_DIRS_MASK paths from SEARCH_DIRS. (Bug 194993) svn path=/; revision=461 --- diff --git a/trunk/src/revdep-rebuild/revdep-rebuild b/trunk/src/revdep-rebuild/revdep-rebuild index 70c4931..f7a6a00 100755 --- a/trunk/src/revdep-rebuild/revdep-rebuild +++ b/trunk/src/revdep-rebuild/revdep-rebuild @@ -348,10 +348,22 @@ if [[ -r /etc/ld.so.conf && -s /etc/ld.so.conf ]]; then fi # Set the final variables -[[ $SEARCH_DIRS ]] || die 1 "No search defined -- this is a bug." SEARCH_DIRS=$(clean_var <<< "$SEARCH_DIRS") SEARCH_DIRS_MASK=$(clean_var <<< "$SEARCH_DIRS_MASK") LD_LIBRARY_MASK=$(clean_var <<< "$LD_LIBRARY_MASK") +# Filter masked paths from SEARCH_DIRS +filter_SEARCH_DIRS= +for sdir in ${SEARCH_DIRS} ; do + unset skip_me + for mdir in ${SEARCH_DIRS_MASK} ; do + [[ ${sdir} == ${mdir}/* ]] \ + && skip_me=1 && break + done + [[ -n ${skip_me} ]] || filter_SEARCH_DIRS+=" ${sdir}" +done +SEARCH_DIRS=$(clean_var "${filter_SEARCH_DIRS}") +unset sdir mdir skip_me filter_SEARCH_DIRS +[[ $SEARCH_DIRS ]] || die 1 "No search defined -- this is a bug." set_trap() { trap "rm_temp $1" SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM