diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2008-02-16 20:51:01 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2008-02-16 20:51:01 +0000 |
| commit | 058422e807e126d8d50649a7e6125332a6717902 (patch) | |
| tree | ff2ff297101b21e2128a3d76cd233fc301970df9 /trunk | |
| parent | 29d3940b1965ed5a739bd1f59de685b8caadf5e1 (diff) | |
| download | gentoolkit-058422e807e126d8d50649a7e6125332a6717902.tar.gz | |
Filter SEARCH_DIRS_MASK paths from SEARCH_DIRS. (Bug 194993)
svn path=/; revision=461
Diffstat (limited to 'trunk')
| -rwxr-xr-x | trunk/src/revdep-rebuild/revdep-rebuild | 14 |
1 files changed, 13 insertions, 1 deletions
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 |
