From 61d03d928698925593e5efaf48fe8229036a6db8 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 16 Oct 2015 03:13:19 -0400 Subject: sbosrcarch: fix builds where DOWNLOAD="UNSUPPORTED" --- sbosrcarch | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sbosrcarch b/sbosrcarch index 437a7d6..49ca980 100755 --- a/sbosrcarch +++ b/sbosrcarch @@ -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; -- cgit v1.2.3