Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 298651
Collapse All | Expand All

(-)revdep-rebuild (-2 / +21 lines)
Lines 664-669 Link Here
664
		einfo "Generated new $FILES_FILE"
664
		einfo "Generated new $FILES_FILE"
665
	fi
665
	fi
666
}
666
}
667
parse_ld_so_conf() {
668
	# FIXME: not safe for paths with spaces
669
	local include
670
	for path in $(sed '/^#/d;s/#.*$//' < /etc/ld.so.conf); do
671
		if [[ $include = true ]]; then
672
			for include_path in $(sed '/^#/d;s/#.*$//' /etc/${path}); do
673
				echo $include_path
674
			done
675
			include=""
676
			continue
677
		fi
678
		if [[ $path != include ]]; then
679
			echo $path
680
		else
681
			include="true"
682
			continue
683
		fi
684
	done
685
}
667
get_ldpath() {
686
get_ldpath() {
668
	local COMPLETE_LD_LIBRARY_PATH
687
	local COMPLETE_LD_LIBRARY_PATH
669
	[[ $SEARCH_BROKEN && $FULL_LD_PATH ]] || return
688
	[[ $SEARCH_BROKEN && $FULL_LD_PATH ]] || return
Lines 676-682 Link Here
676
		COMPLETE_LD_LIBRARY_PATH=(
695
		COMPLETE_LD_LIBRARY_PATH=(
677
			/lib*
696
			/lib*
678
			/usr/lib*
697
			/usr/lib*
679
			$(sed '/^#/d;s/#.*$//' < /etc/ld.so.conf)
698
			$(parse_ld_so_conf)
680
			$(sed 's:/[^/]*$::' < "$FILES_FILE" | sort -ru)
699
			$(sed 's:/[^/]*$::' < "$FILES_FILE" | sort -ru)
681
		)
700
		)
682
		IFS=':'
701
		IFS=':'
Lines 1063-1069 Link Here
1063
1082
1064
	# Get the directories from /etc/ld.so.conf
1083
	# Get the directories from /etc/ld.so.conf
1065
	if [[ -r /etc/ld.so.conf && -s /etc/ld.so.conf ]]; then
1084
	if [[ -r /etc/ld.so.conf && -s /etc/ld.so.conf ]]; then
1066
		SEARCH_DIRS+=" "$(sed '/^#/d;s/#.*$//' /etc/ld.so.conf)
1085
		SEARCH_DIRS+=" "$(parse_ld_so_conf)
1067
	fi
1086
	fi
1068
1087
1069
	# Set the final variables
1088
	# Set the final variables

Return to bug 298651