aboutsummaryrefslogtreecommitdiffstats
path: root/find-requires.in
diff options
context:
space:
mode:
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