Skip to content

Commit

Permalink
Merge pull request #826 from gugod/arch-munge
Browse files Browse the repository at this point in the history
map i386 to x86_64 when making urls of skaji-relocatable-perl
  • Loading branch information
gugod authored Nov 15, 2024
2 parents 114437a + 692f344 commit b0baf72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/App/Perlbrew/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ sub looks_like_url_of_skaji_relocatable_perl {
sub _arch_compat {
my ($arch) = @_;
my $compat = {
x86_64 => "amd64"
x86_64 => "amd64",
i386 => "amd64",
};
return $compat->{$arch} || $arch;
}
Expand All @@ -143,7 +144,7 @@ sub make_skaji_relocatable_perl_url {
my $version = $1;
my $os = $sys->os;
my $arch = $sys->arch;
$arch = "amd64" if $arch eq 'x86_64';
$arch = "amd64" if $arch eq 'x86_64' || $arch eq 'i386';

return "https://github.com/skaji/relocatable-perl/releases/download/$version/perl-$os-$arch.tar.gz";
}
Expand Down
5 changes: 3 additions & 2 deletions perlbrew
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,8 @@ $fatpacked{"App/Perlbrew/Util.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".
sub _arch_compat {
my ($arch) = @_;
my $compat = {
x86_64 => "amd64"
x86_64 => "amd64",
i386 => "amd64",
};
return $compat->{$arch} || $arch;
}
Expand All @@ -560,7 +561,7 @@ $fatpacked{"App/Perlbrew/Util.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".
my $version = $1;
my $os = $sys->os;
my $arch = $sys->arch;
$arch = "amd64" if $arch eq 'x86_64';
$arch = "amd64" if $arch eq 'x86_64' || $arch eq 'i386';
return "https://github.com/skaji/relocatable-perl/releases/download/$version/perl-$os-$arch.tar.gz";
}
Expand Down

0 comments on commit b0baf72

Please sign in to comment.