summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-01-07 13:57:10 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-01-07 13:57:10 +0200
commit37bff306ae3ca6e7402939748fc9b3ea062851fb (patch)
treeae28370102f5d3495c10347eb6b6a1999b531c2a /scripts
parenta93afe303547408a6a477c08e7e7b8e53b3f91d1 (diff)
downloadrpm-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-xscripts/perl.req9
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;
}