On Thu, Dec 11, 2025 at 4:28 PM Christian Kastner <[email protected]> wrote:
>
> On 2025-12-11 14:10, Roman Lebedev wrote:
> > I'm not at all convinced that detecting ubuntu mirror
> > by matching for ubuntu in domain name makes any sense.
> > There's plenty of mirrors that contain that substring in URI
> > and not in domain name.
>
> The substring test is on the full URI, not just the domain name.

Ok, apologies. I was under impression that it was about the domain name only.

> > Why can't the DistroInfo approach be used?
>
> DistroInfo can tell you whether it's a Debian or Ubuntu release, but it
> can't (AFAICT) tell you whether codename X is older than codename Y,
> which is one of the problems we are facing here.

Looking at /usr/share/perl5/Debian/DistroInfo.pm,
there's relevant 'created' and 'release' fields with dates
for each codename, so in principle one could
just hardcode the last bad(first good?) distro
and compare the dates.
Not sure if i'm pointing out something that was already obvious.

> > Why can't the detection be codename-based?
>
> That's what I meant below, with the hard-coded approach.
>
> >> If you want to go ahead, search for "jessie" in autopkgtest-build-qemu
> >> and see that there is already a hard-coded list for older releases in
> >> there. It would probably be the easiest to just follow that, for the
> >> older releases. autopkgtest depends on python3-distro-info but I didn't
> >> see a ranking/sorting function there.
> Best,
> Christian

Thank you.

Roman.

Reply via email to