I built an RPM and tried to install it but got the error message "error: failed dependancies all: is needed by pkg" Upon investigation, I discovered that a makefile was included in the RPM with "all" as the target on the first line. The makefile also had execute permissions set. The output from "file makefile" is "make commands text", so it was being treated as a script in find-requires. Anyway, here is a patch if you want it, compared against RedHat 6.2. The problem was still there on 7 though. --- find-requires.old Wed Mar 1 15:24:58 2000 +++ find-requires Tue Nov 28 17:23:20 2000 @@ -22,7 +22,9 @@ for f in $scriptlist; do if [ -x $f ]; then - head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1 + if `head -1 $f | grep '^\#\!' > /dev/null`; then + head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1 + fi fi done | sort -u
Why are your Makefiles marked executable? (They won't get picked up by find-requires if they aren't...)
It is there with exec permissions because we copy a whole directory, and then we do a global chmod on the contents. Essentially we are to lazy to specify the files individually. Just because we are careless in that regard doesn't mean that the script shouldn't do the right thing however. This patch is better and much less annoying. --- find-requires.old Wed Mar 1 15:24:58 2000 +++ find-requires Wed Nov 29 09:31:37 2000 @@ -22,7 +22,7 @@ for f in $scriptlist; do if [ -x $f ]; then - head -1 $f | sed -e 's/^\#\![ ]*//' | cut -d" " -f1 + head -1 $f | grep '^\#\!' | sed -e 's/^\#\![ ]*//' | cut -d" " -f1 fi done | sort -u
Changing component.
This isn't important enogh to fix in rpm. However, if you wish to configure your own find-requires, then do mkdir -p /etc/rpm cp /usr/lib/rpm/find-requires /etc/rpm/find-requires <... apply your patch ...> echo "%_find_requires /etc/rpm/find-requires" >> /etc/rpm/macros