die "system(\"@cmd\") returned $ret and/or failed with status $code";
}
- while ($err =~ /SRC_URI=((['"]).*?\2|\S+)/gs) {
- $uri = $1;
- $uri =~ s{^(['"])(.*?)\1$}{$2}s;
+ my %map;
+ while ($err =~ /([a-zA-Z0-9_]+)=((['"]).*?\3|\S+)/gs) {
+ my $key = $1;
+ my $val = $2;
+ $val =~ s{^(['"])(.*?)\1$}{$2}s;
+ $map{$key} = $val;
}
+
+ $uri = $map{SRC_URI};
+ unless (defined $uri) {
+ my $author = $map{MODULE_AUTHOR};
+ if (defined $author) {
+ my ($au, $a) = $author =~ /^((.).)/;
+ my $dist_version = $map{MODULE_VERSION};
+ $dist_version = $last->[1] unless defined $dist_version;
+ $uri = "mirror://cpan/$a/$au/$author/$pkg_name/$dist_version.tar.gz";
+ }
+ }
+
$fetched_uri{$ebuild} = $uri;
Storable::store([
$timestamp,