Commit 108cdbf6 authored by Dietmar Maurer's avatar Dietmar Maurer

APLInfo: support relative locations

parent 8ad3ca86
......@@ -105,7 +105,11 @@ sub read_aplinfo_from_fh {
my $template;
if ($res->{location}) {
$template = $res->{location};
$template =~ s|.*/([^/]+.tar.gz)|$1|;
$template =~ s|.*/([^/]+.tar.[gx]z)$|$1|;
if ($res->{location} !~ m|^([a-zA-Z]+)\://|) {
# relative localtion (no http:// prefix)
$res->{location} = "$source/$res->{location}";
}
} else {
my $arch = $res->{architecture} || 'i386';
$template = "$res->{os}-$res->{package}_$res->{version}_$arch.tar.gz";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment