Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 193979 | Differences between
and this patch

Collapse All | Expand All

(-)revdep-rebuild.orig (-10 / +6 lines)
Lines 165-177 Link Here
165
# Replace whitespace with linebreaks, normalize repeated '/' chars, and sort -u
165
# Replace whitespace with linebreaks, normalize repeated '/' chars, and sort -u
166
# (If any libs have whitespace in their filenames, someone needs punishment.)
166
# (If any libs have whitespace in their filenames, someone needs punishment.)
167
clean_var() {
167
clean_var() {
168
	[[ $@ = '-*'* ]] && return
168
	awk 'BEGIN{RS=/[[:space:]]/}
169
	shopt -s extglob
169
		/-\*/   {exit}
170
	local a="$@"
170
		        {gsub(/\/\/+, "/"); print}' | sort -u
171
	a="${a%%[[:space:]]-\*[[:space:]]*}" # Delete what follows -*
172
	a="${a//+([[:space:]])/$'\n'}"       # Turn spaces into linebreaks
173
	a="${a//+(\/\/)//}"                  # Normalize slashes
174
	sort -u <<< "$a"
175
}
171
}
176
# Exit and optionally output to sterr
172
# Exit and optionally output to sterr
177
die() {
173
die() {
Lines 352-360 Link Here
352
348
353
# Set the final variables
349
# Set the final variables
354
[[ $SEARCH_DIRS ]] || die 1 "No search defined -- this is a bug."
350
[[ $SEARCH_DIRS ]] || die 1 "No search defined -- this is a bug."
355
SEARCH_DIRS=$(clean_var "$SEARCH_DIRS")
351
SEARCH_DIRS=$(clean_var <<< "$SEARCH_DIRS")
356
SEARCH_DIRS_MASK=$(clean_var "$SEARCH_DIRS_MASK")
352
SEARCH_DIRS_MASK=$(clean_var <<< "$SEARCH_DIRS_MASK")
357
LD_LIBRARY_MASK=$(clean_var "$LD_LIBRARY_MASK")
353
LD_LIBRARY_MASK=$(clean_var <<< "$LD_LIBRARY_MASK")
358
354
359
set_trap() {
355
set_trap() {
360
	trap "rm_temp $1" SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM
356
	trap "rm_temp $1" SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM

Return to bug 193979