[Mageia-dev] Notice on rpm-mageia-setup's find-requires script

nicolas vigier boklm at mars-attacks.org
Fri May 6 18:28:37 CEST 2011


On Fri, 06 May 2011, Thierry Vignaud wrote:

> On 6 May 2011 16:58, nicolas vigier <boklm at mars-attacks.org> wrote:
> >> >>> > The second.
> >> >>>
> >> >>> Ouch.
> >> >>>
> >> >>> I guess we need to rebuild all perl packages since mid april then.
> >> >>
> >> >> Not all perl packages. Only the packages including perl scripts.
> >> > But I doubt there is an easy way finding those packages :(
> >>
> >> In order to remain on the safe side, we should just rebuild all
> >> packages build in that time frame...
> >
> > Or someone can make a script to extract all packages and find perl
> > scripts.
> 
> Why may miss somes.
> I would prefer staying on the safe side...

If done correctly, we should not miss any of them.

Something like this (copied from find-requires) will find all perl
scripts from list of files given on stdin:

filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
scriptlist=`echo "$filelist" | grep -v /usr/doc | grep -v /usr/share/doc | xargs -r file | \
        egrep ":.* (commands|script)" | cut -d: -f1`
for f in $scriptlist; do
    [ -r $f -a -x $f ] || continue
    interp=`head -n 1 $f | grep '^#!' | sed -e 's/^\#\![        ]*//' | cut -d" " -f1`
    interplist="$interplist $interp"
    case $interp in
    */perl)     perllist="$perllist $f" ;;
    esac
done

So we can make a script that will extract an rpm in a temporary
directory with rpm2cpio, find perl scripts, and print source rpm if a
perl script is found. And after running this script on all packages we
have the list of what we need to rebuild.

I won't have time to do it now or this weekend, but will try to do it
on monday if nobody does it before.



More information about the Mageia-dev mailing list