]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-find-perl-requires
- ugly gcc hack not needed.
[packages/rpm.git] / rpm-find-perl-requires
CommitLineData
57006b2d
AF
1#!/bin/sh
2ulimit -c 0
edb85bf4 3cd `rpm --eval %{_builddir}`
57006b2d
AF
4
5filelist=`sed "s/['\"]/\\\&/g"`
edb85bf4
JK
6if [ -f __rpm_noautoreqfiles ] ; then
7 for i in `cat __rpm_noautoreqfiles`; do
8 filelist=`echo $filelist | sed "s![[:space:]]*$i[[:space:]]*!!g"`
9 done
10fi
57006b2d 11
bed5f4f5 12requires="`echo $filelist | /usr/lib/rpm/find-requires`"
13requires_perl="`echo $filelist | xargs /usr/lib/rpm/perl.req`"
1ebdd280
JR
14
15eval "`perl -V:installsitearch`"
16if [ -n "`echo $filelist | grep $installsitearch`" ] ; then
17 requires_perlarch="$installsitearch `LC_ALL="C" rpm -q --queryformat '%{NAME} = %{VERSION}' perl| grep -v "is not"`"
18fi
19
edb85bf4
JK
20if [ -f __rpm_noautoreq ] ; then
21 for i in `cat __rpm_noautoreq`; do
22 requires_perl=`echo $requires_perl | sed "s!\<$i[[:space:]]*!!g"`
23 done
24fi
25
a63624d6 26requires_perl_t="$requires_perl"
edb85bf4
JK
27if [ -f __rpm_noautoreqdep ] ; then
28 for i in `cat __rpm_noautoreqdep`; do
29 requires_perl_t=`echo $requires_perl_t | sed "s!\<$i[[:space:]]*!!g"`
30 done
31fi
32
33requires_mod="`LC_ALL=C rpm -q --whatprovides --qf "%{NAME}\n" $requires_perl_t 2>/dev/null`"
57006b2d
AF
34echo "$requires
35$requires_perl
1ebdd280 36$requires_perlarch
f5aa07b2 37$requires_mod"| grep -v "no package provides" | sort -u
This page took 0.037166 seconds and 4 git commands to generate.