scripts/shell.req.in: fixed sed filter

See my previous commit.  It goes like this:

$ /usr/lib/rpm/shell.req -v /usr/bin/buildreq
shell.req: /usr/bin/buildreq: cat -> /bin/cat -> coreutils (via rpmdb)
shell.req: /usr/bin/buildreq: cmp -> /usr/bin/cmp -> diffutils (via rpmdb)
shell.req: /usr/bin/buildreq: function(Info) not found (skip)
shell.req: /usr/bin/buildreq: function(show_help) not found (skip)
shell.req: /usr/bin/buildreq: function(show_usage) not found (skip)
shell.req: /usr/bin/buildreq: rm -> /bin/rm -> coreutils (via rpmdb)
shell.req: /usr/bin/buildreq: sed -> /bin/sed -> sed (via rpmdb)
coreutils
diffutils
sed
$

I argue that this behaviour, i.e. function(Info) processing, is erroneous.
There are two reasons: 1) it is impossible to resolve function(Info) neither
via FindPackage nor via .provides.sh (the latter has just plain function names);
2) the fact that Info has been detected as function means that Info() function
is defined in the very same file, i.e. /usr/bin/buildreq.  This means that
function(Info) is self-provided dependency and thus should not be processed
at all.
This commit is contained in:
Alexey Tourbin 2007-03-06 22:42:07 +03:00
parent ed12439edd
commit e69e87503e

View File

@ -48,7 +48,7 @@ if ! reqs="$($FIND_REQ "$file" 2>/dev/null)"; then
reqs="$($FIND_REQ "$file")"
fi
fi
reqs="$(printf %s\\n "$reqs" |sed -e 's/^\(sh\|bash\|executable\)(\(.*\))$/\2/g' |LC_COLLATE=C sort -u)"
reqs="$(printf %s\\n "$reqs" |sed -n 's/^\(sh\|bash\|executable\)(\(.*\))$/\2/p' |LC_COLLATE=C sort -u)"
[ -n "$reqs" ] || exit 0
. @RPMCONFIGDIR@/find-package