From f32d09a78a56136cbbbf5a1a748ac8ad9ab8ea56 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 24 Aug 2012 07:07:02 +0000 Subject: find-provides: fix pok's perlapi auto provides --- NEWS | 2 ++ find-provides.in | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index ed7ceb7..e3c3ebf 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- find-provides: fix pok's perlapi auto provides + Version 1.156 - 21 Aug 2012, by Thierry Vignaud - find-provides: ignore fontconfig.prov exit code (mga#7078) 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 -- cgit v1.2.1