diff -r -u gentoolkit-0.2.4_pre7.orig/src/revdep-rebuild/revdep-rebuild gentoolkit-0.2.4_pre7/src/revdep-rebuild/revdep-rebuild --- gentoolkit-0.2.4_pre7.orig/src/revdep-rebuild/revdep-rebuild 2008-01-29 10:13:53.000000000 -0800 +++ gentoolkit-0.2.4_pre7/src/revdep-rebuild/revdep-rebuild 2008-01-29 10:15:36.000000000 -0800 @@ -38,7 +38,7 @@ echo echo " -X, --package-names Emerge based on package names, not exact versions" echo " --library NAME Emerge existing packages that use the library with NAME" - echo " --library=NAME NAME can be a full path to the library or a basic" + echo " --library=NAME NAME can be a full path to the library or an extended" echo " regular expression (man grep)" echo " -np, --no-ld-path Do not set LD_LIBRARY_PATH" echo " -nc, --nocolor Turn off colored output" @@ -181,7 +181,7 @@ PACKAGE_NAMES=false SONAME="not found" -SONAME_GREP=grep +SONAME_GREP="grep -E" SEARCH_BROKEN=true EXTRA_VERBOSE=false KEEP_TEMP=false diff -r -u gentoolkit-0.2.4_pre7.orig/src/revdep-rebuild/revdep-rebuild-rewrite gentoolkit-0.2.4_pre7/src/revdep-rebuild/revdep-rebuild-rewrite --- gentoolkit-0.2.4_pre7.orig/src/revdep-rebuild/revdep-rebuild-rewrite 2008-01-29 10:13:53.000000000 -0800 +++ gentoolkit-0.2.4_pre7/src/revdep-rebuild/revdep-rebuild-rewrite 2008-01-29 11:07:55.000000000 -0800 @@ -147,7 +147,7 @@ --no-util=UTIL UTIL can be one of portage-utils or pkgcore or it can be a *quoted* space-delimited list. -L, --library NAME Emerge existing packages that use the library with NAME - --library=NAME NAME can be a full path to the library or a basic + --library=NAME NAME can be a full path to the library or an extended regular expression (man grep) Calls emerge, all other options are used for it (e. g. -p, --pretend). @@ -540,10 +540,10 @@ ldd_status=$? # TODO: Check this for problems with sort # HACK: if LD_LIBRARY_MASK is null or undefined grep -vF doesn't work if grep -vF "${LD_LIBRARY_MASK:=$'\a'}" <<< "$ldd_output" | - grep -q "$SONAME_SEARCH"; then + grep -qE "$SONAME_SEARCH"; then if [[ $SEARCH_BROKEN && $FULL_LD_PATH ]]; then if LD_LIBRARY_PATH="$COMPLETE_LD_LIBRARY_PATH" ldd "$target_file" 2>/dev/null | - grep -vF "$LD_LIBRARY_MASK" | grep -q "$SONAME_SEARCH"; then + grep -vF "$LD_LIBRARY_MASK" | grep -qE "$SONAME_SEARCH"; then # FIXME: I hate duplicating code # Only build missing direct dependencies MISSING_LIBS=$( @@ -564,8 +564,8 @@ # FIXME: I hate duplicating code # Only rebuild for direct dependencies MISSING_LIBS=$( - expr="/$SONAME_SEARCH/s/^[[:space:]]*\([^[:space:]]*\).*$/\1/p" - sort -u <<< "$ldd_output" | sed -n "$expr" + expr="/$SONAME_SEARCH/s/^[[:space:]]*([^[:space:]]*).*$/\1/p" + sort -u <<< "$ldd_output" | sed -r -n "$expr" ) REQUIRED_LIBS=$( expr='s/^[[:space:]]*NEEDED[[:space:]]*\([^[:space:]]*\).*/\1/p';