diff options
Diffstat (limited to 'sbosrcarch')
-rwxr-xr-x | sbosrcarch | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -400,21 +400,26 @@ sub parse_info { $got =~ s/\\\s*\n//gs; # join \ continuation lines $got =~ s/[ \t]+/ /g; # condense whitespace - $got =~ /DOWNLOAD(?:_x86_64)?="([^"]+)"/; - my @urls = split " ", $1; + my @urls = (); + while($got =~ /DOWNLOAD(?:_x86_64)?="((?:htt|ft)[^"]+)"/gc) { + push @urls, split " ", $1; + } - $got =~ /MD5SUM(?:_x86_64)?="([^"]+)"/; - my @md5s = split " ", $1; + my @md5s = (); + while($got =~ /MD5SUM(?:_x86_64)?="([^"]+)"/gc) { + push @md5s, split " ", $1; + } for(@md5s) { - die "bad md5sum in $file\n" unless /^[0-9a-f]{32}$/; + print "bad md5sum in $file\n", return undef unless /^[0-9a-f]{32}$/; } my %ret; for(@urls) { - next if /^un(test|support)ed$/i; + my $m = shift @md5s; + #next if /^un(test|support)ed$/i; # no longer need print "bad URL in $file (backtick)\n", next if /`/; # backticks should never occur! - $ret{$_} = shift @md5s; + $ret{$_} = $m; } return \%ret; |