diff options
-rwxr-xr-x | sbosrcarch | 17 |
1 files changed, 4 insertions, 13 deletions
@@ -400,19 +400,10 @@ sub parse_info { $got =~ s/\\\s*\n//gs; # join \ continuation lines $got =~ s/[ \t]+/ /g; # condense whitespace - my @urls = (); - while($got =~ /DOWNLOAD(?:_x86_64)?="((?:htt|ft)[^"]+)"/gc) { - push @urls, split " ", $1; - } - - my @md5s = (); - while($got =~ /MD5SUM(?:_x86_64)?="([^"]+)"/gc) { - push @md5s, split " ", $1; - } - - for(@md5s) { - print "bad md5sum in $file\n", return undef unless /^[0-9a-f]{32}$/; - } + my @urllines = ($got =~ /DOWNLOAD(?:_x86_64)?="\s*((?:htt|ft)[^"]+)"/g); + my @md5lines = ($got =~ /MD5SUM(?:_x86_64)?="\s*([0-9a-f][^"]+)"/g); + my @urls = split " ", join " ", @urllines; + my @md5s = split " ", join " ", @md5lines; my %ret; for(@urls) { |