diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-01-07 13:57:10 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-01-07 13:57:10 +0200 |
commit | 37bff306ae3ca6e7402939748fc9b3ea062851fb (patch) | |
tree | ae28370102f5d3495c10347eb6b6a1999b531c2a /scripts | |
parent | a93afe303547408a6a477c08e7e7b8e53b3f91d1 (diff) | |
download | rpm-37bff306ae3ca6e7402939748fc9b3ea062851fb.tar.gz rpm-37bff306ae3ca6e7402939748fc9b3ea062851fb.tar.bz2 rpm-37bff306ae3ca6e7402939748fc9b3ea062851fb.zip |
Handle "use vX.X.X" in perl dependency extraction (rhbz#140597)
Patch by Steven Prichard
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/perl.req | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/perl.req b/scripts/perl.req index fda79bae1..0d26346bb 100755 --- a/scripts/perl.req +++ b/scripts/perl.req @@ -203,16 +203,17 @@ sub process_file { $module =~ s/\(\s*\)$//; - if ( $module =~ m/^[0-9._]+$/ ) { + if ( $module =~ m/^v?([0-9._]+)$/ ) { # if module is a number then both require and use interpret that # to mean that a particular version of perl is specified - if ($module =~ /5.00/) { - print "perl >= 0:$module\n"; + my $ver=$1; + if ($ver =~ /5.00/) { + print "perl >= 0:$ver\n"; next; } else { - print "perl >= 1:$module\n"; + print "perl >= 1:$ver\n"; next; } |