find-package (FindByPath): discard rpmquery stderr

This commit is contained in:
Alexey Tourbin 2007-08-08 02:54:04 +04:00
parent 968016ffdc
commit bd368155cd

View File

@ -111,7 +111,7 @@ FindByPath()
fi
# Check package database.
if package="$(rpmquery --whatprovides --queryformat='%{NAME}\n' -- "$rep")"; then
if package="$(rpmquery --whatprovides --queryformat='%{NAME}\n' -- "$rep" 2>/dev/null)"; then
package="$(printf %s "$package" |LC_COLLATE=C sort -u)"
local n="$(IFS=$'\n'; set -- $package; echo $#)"
if [ "$n" = 1 ]; then