find-package, shebang.req: introduced RPM_FINDPACKAGE_MANDATORY=1
This commit is contained in:
parent
6c3490a2cf
commit
75b044f2cb
@ -63,6 +63,10 @@ Debug "RPM_FINDPACKAGE_ROOT_PATH=$RPM_FINDPACKAGE_ROOT_PATH"
|
||||
# to use the latter plan.
|
||||
RPM_FINDPACKAGE_HOST_PKG_NAMES=
|
||||
|
||||
# When an interpreter is invoked by name, as in "#!/usr/bin/env python32",
|
||||
# and is missing, this can force the dependency on /usr/bin/python32.
|
||||
RPM_FINDPACKAGE_MANDATORY=
|
||||
|
||||
# Below we use 'local Verbose=Info' to increase per-case verbosity.
|
||||
Verbose=Verbose
|
||||
|
||||
@ -411,7 +415,10 @@ FindByName()
|
||||
[!A-Za-z_]*) ;;
|
||||
*[A-Z_]*) maybe_function=1 ;;
|
||||
esac
|
||||
if [ -n "$maybe_function" ]; then
|
||||
if [ -n "$RPM_FINDPACKAGE_MANDATORY" ]; then
|
||||
Info "$f: $r not found, forcing /usr/bin/$r"
|
||||
printf '%s\n' "/usr/bin/$r"
|
||||
elif [ -n "$maybe_function" ]; then
|
||||
$Verbose "$f: $r not found (skip, maybe function)"
|
||||
else
|
||||
Info "$f: $r not found (skip)"
|
||||
|
@ -41,6 +41,7 @@ ShebangReq()
|
||||
Warning "$f: trailing <CR> in arguments: $line"
|
||||
}
|
||||
|
||||
local RPM_FINDPACKAGE_MANDATORY=1
|
||||
case "$#,$1" in
|
||||
1,*)
|
||||
CheckInterp "$1"
|
||||
|
Loading…
Reference in New Issue
Block a user