diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-08-24 07:07:02 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-08-24 07:07:02 +0000 |
commit | f32d09a78a56136cbbbf5a1a748ac8ad9ab8ea56 (patch) | |
tree | 07c7567838d71bf159e2cb1c7ec3f702571abd18 /find-provides.in | |
parent | 0624a1ee6366d6714cfd10e4cd6b8877955d9eac (diff) | |
download | rpm-setup-f32d09a78a56136cbbbf5a1a748ac8ad9ab8ea56.tar rpm-setup-f32d09a78a56136cbbbf5a1a748ac8ad9ab8ea56.tar.gz rpm-setup-f32d09a78a56136cbbbf5a1a748ac8ad9ab8ea56.tar.bz2 rpm-setup-f32d09a78a56136cbbbf5a1a748ac8ad9ab8ea56.tar.xz rpm-setup-f32d09a78a56136cbbbf5a1a748ac8ad9ab8ea56.zip |
find-provides: fix pok's perlapi auto provides
Diffstat (limited to 'find-provides.in')
-rwxr-xr-x | find-provides.in | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/find-provides.in b/find-provides.in index e64b34f..df7bfb7 100755 --- a/find-provides.in +++ b/find-provides.in @@ -52,8 +52,13 @@ if [ -n "`echo $filelist | grep -e '/CORE/libperl\.so'`" ]; then for i in $filelist; do if [ -n "`echo $i | grep -e '/CORE/libperl\.so\$'`" ]; then perlpath=$i - version=`perl -I"$perlpath" -MConfig -e 'print $Config{version}'` - [ $? == 0 ] && echo "perlapi-$version" + version=${i/CORE*/} + version=$(echo $version| sed -e 's!/$!!' -e 's!/[^/]*$!!' -e 's!.*/!!') + minor=$(echo $version| sed -e 's!^.*\.!!') + major=$(echo $version| sed -e 's!\.[0-9]*$!!') + if [ -n "$version" ] && [ -n "$minor" ]; then + for i in $(seq 0 $minor); do echo "perlapi-$major.$i"; done + fi fi done fi |