1
0
forked from pool/kernel-source
kernel-source/find-provides
OBS User autobuild 038f7eb26e Accepting request 30627 from Kernel:HEAD
Copy from Kernel:HEAD/kernel-source based on submit request 30627 from user jeff_mahoney

OBS-URL: https://build.opensuse.org/request/show/30627
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kernel-source?expand=0&rev=83
2010-01-29 13:27:16 +00:00

25 lines
648 B
Bash

#! /bin/bash
trap 'rm -f "$filelist"' EXIT
filelist=$(mktemp -t ${0##*/}.XXXXXXXXXX)
grep -v '/kernel/drivers/staging/.*\.ko$' >"$filelist"
shopt -s nullglob
builddir=$1
shift
# pretend that /boot/vmlinux-* is in the -base package and not in -devel
if grep -q '/boot/System\.map\>' "$filelist"; then
prefix=$(sed -rn 's:(.*)/boot/System\.map\>.*:\1:p; T; q' "$filelist")
for f in "$prefix"/boot/vmlinux*; do
echo "$f" >>"$filelist"
if test -e "$builddir/$(basename "$f").provides"; then
cat "$_"
fi
done
else
perl -ni -e 'next if /\/boot\/vmlinux/ && !/\.debug$/; print' "$filelist"
fi
/usr/lib/rpm/find-provides "$@" <"$filelist"