diff options
author | Jérôme Quelin <jquelin@mandriva.org> | 2010-02-10 16:34:36 +0000 |
---|---|---|
committer | Jérôme Quelin <jquelin@mandriva.org> | 2010-02-10 16:34:36 +0000 |
commit | 7770611e745f20814ff34569608edd630b8ab079 (patch) | |
tree | 7b4d9d5459b985b5ec77b262ebb5615f26253a09 | |
parent | 96e402eff8be72bb817aaba1424f07b86dd76b76 (diff) | |
download | rpm-setup-7770611e745f20814ff34569608edd630b8ab079.tar rpm-setup-7770611e745f20814ff34569608edd630b8ab079.tar.gz rpm-setup-7770611e745f20814ff34569608edd630b8ab079.tar.bz2 rpm-setup-7770611e745f20814ff34569608edd630b8ab079.tar.xz rpm-setup-7770611e745f20814ff34569608edd630b8ab079.zip |
using generated MYMETA.yml would be better. indeed, this creates what's
been detected.
-rwxr-xr-x | find-requires.in | 2 | ||||
-rwxr-xr-x | perl.req-from-meta | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/find-requires.in b/find-requires.in index 66e80e3..0ef6d51 100755 --- a/find-requires.in +++ b/find-requires.in @@ -178,7 +178,7 @@ fi # # --- Perl modules. -perlmeta=$( echo $filelist | tr '[:blank:]' \\n | egrep '^META.(yml|json)' | head -1 ) +perlmeta=$( echo $filelist | tr '[:blank:]' \\n | egrep '/MYMETA.yml$' ) if [ -n "$perlmeta" ] then [ -x @RPMVENDORDIR@/perl.req-from-meta ] && \ diff --git a/perl.req-from-meta b/perl.req-from-meta index 5b612dd..243f54f 100755 --- a/perl.req-from-meta +++ b/perl.req-from-meta @@ -3,8 +3,7 @@ use strict; use warnings; -use JSON qw{ from_json }; -use YAML qw{ Load }; +use YAML qw{ Load }; # slurp the file my $path = shift; @@ -13,9 +12,7 @@ my $data = do { local $/; <$fh> }; close $fh; # parse meta - either yaml or json -my $meta = $path =~ /\.yml$/ - ? Load( $data ) - : from_json( $data ); +my $meta = Load($data); # dump the requires with their version my $requires = $meta->{requires}; |