[pve-devel] [PATCH installer v2 2/3] country.pl: remove generating mirror information
Christoph Heiss
c.heiss at proxmox.com
Mon Sep 22 12:33:31 CEST 2025
On Mon Sep 22, 2025 at 11:08 AM CEST, Shannon Sterz wrote:
> this is no longer needed, as we don't rely on this information in the
> installer anymore.
`proxmox-auto-installer/tests/resources/locales.json` can/should also be
updated correspondingly.
Although it doesn't cause any errors (since we ignore unknown fields
when deserializing), keeping it in sync would still be good.
>
> Suggested-by: Fiona Ebner <f.ebner at proxmox.com>
> Signed-off-by: Shannon Sterz <s.sterz at proxmox.com>
> ---
> country.pl | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/country.pl b/country.pl
> index 227eba4..be760bb 100755
> --- a/country.pl
> +++ b/country.pl
> @@ -8,23 +8,20 @@ use JSON qw(from_json to_json);
>
> # Generates a
> #
> -# - country code => name/kmap/mirror
> # - name => country code
> #
> # mapping for each defined country
> my sub generate_country_mappings {
> - my ($country_codes, $defmap, $mirrors) = @_;
> + my ($country_codes, $defmap) = @_;
>
> my ($countries, $countryhash) = ({}, {});
> foreach my $cc (sort keys %$country_codes) {
> my $name = $country_codes->{$cc};
> my $kmap = $defmap->{$cc} || '';
> - my $mirror = $mirrors->{$cc} || '';
>
> $countries->{$cc} = {
> name => $name,
> kmap => $kmap,
> - mirror => $mirror,
> };
> $countryhash->{ lc($name) } = $cc;
> }
> @@ -124,12 +121,7 @@ my $defmap = {
> 'li' => 'de-ch',
> };
>
> -my $mirrors = PVE::Tools::debmirrors();
> -foreach my $cc (keys %$mirrors) {
> - die "undefined country code '$cc'" if !defined($country_codes->{$cc});
> -}
> -
> -my ($countries, $countryhash) = generate_country_mappings($country_codes, $defmap, $mirrors);
> +my ($countries, $countryhash) = generate_country_mappings($country_codes, $defmap);
> my ($kmap, $kmaphash) = generate_keymaps($country_codes);
> my ($zones, $cczones) = parse_zoneinfo($countries);
>
More information about the pve-devel
mailing list