aboutsummaryrefslogtreecommitdiffstats
path: root/perl.req-from-meta
diff options
context:
space:
mode:
authorJérôme Quelin <jquelin@mandriva.org>2010-07-14 10:11:26 +0000
committerJérôme Quelin <jquelin@mandriva.org>2010-07-14 10:11:26 +0000
commitb8df618f7c537959d6765c08f4a48f535944a92b (patch)
tree53509b6a2cf02a00ffd4fd5d503896097ace8a10 /perl.req-from-meta
parentaaa86c91b30c1d7ab16e4c974254315f4fe36017 (diff)
downloadrpm-setup-b8df618f7c537959d6765c08f4a48f535944a92b.tar
rpm-setup-b8df618f7c537959d6765c08f4a48f535944a92b.tar.gz
rpm-setup-b8df618f7c537959d6765c08f4a48f535944a92b.tar.bz2
rpm-setup-b8df618f7c537959d6765c08f4a48f535944a92b.tar.xz
rpm-setup-b8df618f7c537959d6765c08f4a48f535944a92b.zip
v1.105 - support to extract perl runtime requires from meta spec 21.105
Diffstat (limited to 'perl.req-from-meta')
-rwxr-xr-xperl.req-from-meta4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl.req-from-meta b/perl.req-from-meta
index 5b612dd..4f921f6 100755
--- a/perl.req-from-meta
+++ b/perl.req-from-meta
@@ -18,7 +18,9 @@ my $meta = $path =~ /\.yml$/
: from_json( $data );
# dump the requires with their version
-my $requires = $meta->{requires};
+my $requires = $meta->{"meta-spec"}{version} >= 2
+ ? $meta->{prereqs}{runtime}{requires}
+ : $meta->{requires};
foreach my $module ( sort keys %$requires ) {
next if $module eq 'perl'; # minimum perl version
my $version = $requires->{$module};