--- /usr/bin/revdep-rebuild 2012-07-17 09:24:29.000000000 -0400 +++ /usr/bin/revdep-rebuild 2013-02-26 12:55:07.000000000 -0500 @@ -673,23 +673,18 @@ fi } parse_ld_so_conf() { - # FIXME: not safe for paths with spaces - local include - for path in $(sed '/^#/d;s/#.*$//' < /etc/ld.so.conf); do - if [[ $include = true ]]; then - for include_path in $(sed '/^#/d;s/#.*$//' /etc/${path} 2>/dev/null); do - echo $include_path + local line + local inc_line + while read line; do + if echo "$line" | grep -q "^include\>"; then + line=$(echo "$line" | sed 's/^include[[:space:]]\+//') + for inc_line in $(sed '/^#/d;s/#.*$//' /etc/${line}); do + echo "$inc_line" done - include="" - continue - fi - if [[ $path != include ]]; then - echo $path else - include="true" - continue + echo "$line" fi - done + done < <(sed '/^#/d;s/#.*$//' /etc/ld.so.conf) } get_ldpath() { local COMPLETE_LD_LIBRARY_PATH