3 # Filter to exclude some Requires targets from those automatically
4 # generated by rpmbuild's helper script find-requires
6 # Specifically intended for Perl modules that PCP uses, but which
7 # may not be packaged in some distributions.
12 echo >&2 "Usage: $0 [option] path-to-real-find-requires [arg]"
14 echo >&2 " -f fedora_version"
15 echo >&2 " -r redhat_version"
16 echo >&2 " -v vendor (\"redhat\" or \"suse\" or ...)"
19 #debug# echo >&2 "$0 called as: $0 $*"
24 while getopts "f:r:v:?" c
39 shift `expr $OPTIND - 1`
49 echo "$0: Error: rpm script $1 not found"
53 # Filtering depends on distro vendor and possibly version
55 # Lines from find-requires look like this ...
58 # libc.so.6(GLIBC_2.2.5)(64bit)
59 # perl(Spreadsheet::Read)
65 # See RedHat BZ 830923 and BZ 754678 for Spreadsheet::Read
67 # Does not seem to matter what version of RH or Fedora.
70 -e '/^perl(Spreadsheet::Read)$/d'
76 |
sed -e '/^#/d' -e '/^[ ]*$/d'
78 # last filter is because the rpm "find-requires" on some platforms emits
79 # lines with a leading # and blank lines ... these kill the rpm packaging
80 # with the dreaded "Failed to find Requires:" error message