Project

General

Profile

Actions

tickets #126557

closed

mirrorcache - for Spain, it finds no countries on the same continent

Added by pjessen over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Mirrors
Target version:
-
Start date:
2023-03-23
Due date:
% Done:

0%

Estimated time:

Description

No mirrors in countries on the same continent despite the world listing containing plenty European mirrors??
http://download.opensuse.org/tumbleweed/repo/oss/x86_64/0ad-0.0.26-1.4.x86_64.rpm.mirrorlist?COUNTRY=ES


Files

Actions #1

Updated by pjessen over 1 year ago

  • Category set to Mirrors
  • Assignee set to andriinikitin
  • Private changed from Yes to No
Actions #2

Updated by javierllorente over 1 year ago

pjessen wrote:

No mirrors in countries on the same continent despite the world listing containing plenty European mirrors??
http://download.opensuse.org/tumbleweed/repo/oss/x86_64/0ad-0.0.26-1.4.x86_64.rpm.mirrorlist?COUNTRY=ES

Spanish user here.
If I remove "COUNTRY=ES", I get all the European mirrors.

Actions #3

Updated by javierllorente over 1 year ago

javierllorente wrote:

Spanish user here.
If I remove "COUNTRY=ES", I get all the European mirrors.

Appending "REGION=EU" after "COUNTRY=ES" as suggested by Elisei Roca (@mirror ml), makes it work.

https://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-KDE-Live-x86_64-Snapshot20230319-Media.iso.mirrorlist?COUNTRY=ES®ION=EU

Actions #4

Updated by andriinikitin over 1 year ago

  • Status changed from New to Resolved

I didn't implement proper country lookup for COUNTRY parameter yet - just added some basic support for those countries in which a mirror exists:

https://github.com/openSUSE/MirrorCache/blob/master/lib/MirrorCache/Utils.pm#L74

But requests from some real Spain IP should find countries in Europe (because it uses GeoIP database), e.g.

https://download.opensuse.org/tumbleweed/repo/oss/x86_64/0ad-0.0.26-1.4.x86_64.rpm.mirrorlist?IP=103.229.168.1

So we need either just extend that list with Spain and all the countries or find some better solution
(MirrorBrain did store countries in DB iirc, maybe MirrorCache should do the same and fill those structures from the DB at startup. Or fetch country - region map from the GeoIP database somehow. Or maybe there is simple perl lib with that mapping).
But I am not sure about priority since workaround with IP should work

Actions #5

Updated by javierllorente over 1 year ago

andriinikitin wrote:

I didn't implement proper country lookup for COUNTRY parameter yet - just added some basic support for those countries in which a mirror exists:

https://github.com/openSUSE/MirrorCache/blob/master/lib/MirrorCache/Utils.pm#L74

AFAIK, Portugal has no mirror but it's in the list of countries with mirror(s).

Actions

Also available in: Atom PDF