aboutsummaryrefslogtreecommitdiffstats
path: root/find-requires.in
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2008-11-23 23:28:25 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2008-11-23 23:28:25 +0000
commitc1236b56b729c4395767247991143497610dd1cb (patch)
tree7802ec0cc81f8ac7d4b46eeb7516a520907d70db /find-requires.in
parente43d2775f0f6f113e6dbe53d04e6292e2f6ced1e (diff)
downloadrpm-setup-c1236b56b729c4395767247991143497610dd1cb.tar
rpm-setup-c1236b56b729c4395767247991143497610dd1cb.tar.gz
rpm-setup-c1236b56b729c4395767247991143497610dd1cb.tar.bz2
rpm-setup-c1236b56b729c4395767247991143497610dd1cb.tar.xz
rpm-setup-c1236b56b729c4395767247991143497610dd1cb.zip
I originally figured that querying rpm database within script weren't supposed
to be done, but as I now see it's done elsewhere, perl-base epoch tag should rather be handled in the script than by autotools
Diffstat (limited to 'find-requires.in')
-rwxr-xr-xfind-requires.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/find-requires.in b/find-requires.in
index 341cae0..7f1930b 100755
--- a/find-requires.in
+++ b/find-requires.in
@@ -92,8 +92,12 @@ fi
#
# --- Perl or python deps
+PERL_EPOCH=`rpm -q --queryformat '%|EPOCH?{[%{EPOCH}]:}|' perl-base`
+if [ $? != 0 ]; then
+ unset PERL_EPOCH
+fi
for f in $filelist; do
- echo $f | sed -n -e 's@.*/usr/lib/perl5/\(site_perl/\)\([0-9]\{1,\}\.[0-9]\{1,\}\)\.\([0-9]\{1,\}\).*$@perl-base >= \2.\3@p' -e "s@.*/usr/lib/perl5/\(vendor_perl\/\)\([.0-9]\{1,\}\).*\$@perl-base >= @PERLEPOCH@\2@p" -e 's@.*/usr/\(lib\|lib64\)/python\([.0-9]\{1,\}\).*$@python-base >= \2@p'
+ echo $f | sed -n -e 's@.*/usr/lib/perl5/\(site_perl/\)\([0-9]\{1,\}\.[0-9]\{1,\}\)\.\([0-9]\{1,\}\).*$@perl-base >= \2.\3@p' -e "s@.*/usr/lib/perl5/\(vendor_perl\/\)\([.0-9]\{1,\}\).*\$@perl-base >= $PERL_EPOCH\2@p" -e 's@.*/usr/\(lib\|lib64\)/python\([.0-9]\{1,\}\).*$@python-base >= \2@p'
done | sort -u