redhat-rpm-config/find-requires

40 lines
990 B
Plaintext
Raw Normal View History

2002-06-12 12:59:50 +00:00
#!/bin/bash
#
# Auto-generate requirements for executables (both ELF and a.out) and library
# sonames, script interpreters, and perl modules.
#
ulimit -c 0
2002-11-14 12:48:21 +00:00
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
2002-06-12 12:59:50 +00:00
[ -x /usr/lib/rpm/rpmdeps -a -n "$filelist" ] && \
echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/rpmdeps --requires
2002-06-12 12:59:50 +00:00
#
# --- Kernel module imported symbols
#
# Since we don't (yet) get passed the name of the package being built, we
# cheat a little here by looking first for a kernel, then for a kmod.
#
2007-06-19 15:18:25 +00:00
unset is_kmod
for f in $filelist; do
if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*).ko$:\2:p') ]
then
2007-06-19 15:18:25 +00:00
is_kmod=1;
elif [ $(echo "$f" | sed -r -ne 's:^.*/boot/(.*):\1:p') ]
then
2007-06-19 15:18:25 +00:00
unset is_kmod;
break;
fi
done
# Disabling for now while the Fedora kernel doesn't produce kABI deps.
#[ -x /usr/lib/rpm/redhat/find-requires.ksyms ] && [ "$is_kmod" ] &&
# printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/redhat/find-requires.ksyms
2002-06-12 12:59:50 +00:00
exit 0