diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-09-08 17:21:35 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2014-09-12 22:26:14 +0200 |
commit | 986531bbeb989ec830b07bd661ffd29ba844e736 (patch) | |
tree | 3ee2652cbc0be982d6d5e52773bb3a3becb3ba73 /perl_base.req | |
parent | c16f6a7e4bcb99c172f46c292bad94e6edcff039 (diff) | |
download | rpm-setup-986531bbeb989ec830b07bd661ffd29ba844e736.tar rpm-setup-986531bbeb989ec830b07bd661ffd29ba844e736.tar.gz rpm-setup-986531bbeb989ec830b07bd661ffd29ba844e736.tar.bz2 rpm-setup-986531bbeb989ec830b07bd661ffd29ba844e736.tar.xz rpm-setup-986531bbeb989ec830b07bd661ffd29ba844e736.zip |
convert perl-base to internal generator
we also patch rpm's script.req for outputing perl-base instead of
/usr/bin/perl
Diffstat (limited to 'perl_base.req')
-rw-r--r-- | perl_base.req | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/perl_base.req b/perl_base.req new file mode 100644 index 0000000..eb95024 --- /dev/null +++ b/perl_base.req @@ -0,0 +1,18 @@ +#!/bin/sh +# Requires on perl-base + +perlepoch=`rpm -q --qf '%|EPOCH?{[%{EPOCH}]:}|' perl-base` +if [ $? != 0 ]; then + unset perlepoch +fi + +tmpdeplist= + +while read instfile ; do + dep="`echo $instfile | sed -n -e "s@.*/usr/lib/perl5/\(vendor_perl/\|site_perl/\|\)\([.0-9]\{1,\}\).*\\$@perl-base >= $perlepoch\2@p"`" + if [[ -n $dep && -z `echo $uniqdeplist $tmpdeplist|grep "$dep"` ]]; then + tmpdeplist+="$dep\n" + fi +done + +echo -n -e $tmpdeplist | sort -u |