Fix region handling of broken mirrors
authorMichael Prokop <mika@grml.org>
Thu, 12 May 2022 10:54:09 +0000 (12:54 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 12 May 2022 10:54:09 +0000 (12:54 +0200)
The handling of region vs broken mirrors (in state "f") is wrong,
and we might end up with the wrong URLs in foreign regions, like:

| # ./generate_mirror_map| sort -u
| at mirror.alwyzon.net/grml/|at.mirror.anexia.com/grml/
| br grml.c3sl.ufpr.br//
| ch mirror.de.leaseweb.net/grml/|ftp.halifax.rwth-aachen.de/grml/|mirror.23m.com/grml/
| cn mirror.de.leaseweb.net/grml/|ftp.halifax.rwth-aachen.de/grml/|mirror.23m.com/grml/
| de mirror.de.leaseweb.net/grml/|ftp.halifax.rwth-aachen.de/grml/|mirror.23m.com/grml/
| fi mirror.de.leaseweb.net/grml/|ftp.halifax.rwth-aachen.de/grml/|mirror.23m.com/grml/
| gb mirror.bytemark.co.uk/grml/
| hk mirror-hk.koddos.net/grml/
| ir mirror.bardia.tech/grml/
| nl mirror.koddos.net/grml/|mirror.nl.leaseweb.net/grml/
| tw tw1.mirror.blendbyte.net/grml/
| ua grml.ip-connect.info//|grml.ip-connect.vn.ua//
| us mirror.us.leaseweb.net/grml/|mirrors.rit.edu/grml/

Now with the fixed behavior, we get what we're expecting:

| # ./generate_mirror_map| sort -u
| at mirror.alwyzon.net/grml/|at.mirror.anexia.com/grml/
| br grml.c3sl.ufpr.br//
| de mirror.23m.com/grml/|mirror.de.leaseweb.net/grml/|ftp.halifax.rwth-aachen.de/grml/
| gb mirror.bytemark.co.uk/grml/
| hk mirror-hk.koddos.net/grml/
| ir mirror.bardia.tech/grml/
| nl mirror.nl.leaseweb.net/grml/|mirror.koddos.net/grml/
| tw tw1.mirror.blendbyte.net/grml/
| ua grml.ip-connect.info//|grml.ip-connect.vn.ua//
| us mirror.us.leaseweb.net/grml/|mirrors.rit.edu/grml/


No differences found