Display a warning if a modern distribution URL doesn't end in .wsl (#12463)

Blue committed Jan 14, 2025 at 14:37 UTC 52d1e510ae016a4ac90344ed1475ddfa95c22bf8
1 file changed +2
distributions/validate-modern.py
+2
@@ -403,6 +403,8 @@ def read_tar(flavor: str, name: str, file, elf_magic: str):
403
404 def read_url(flavor: str, name: str, url: dict, elf_magic):
405 hash = hashlib.sha256()
406 + if not url['Url'].endswith('.wsl'):
407 + warning(flavor, name, f'Url does not point to a .wsl file: {url["Url"]}')
408
409 if url['Url'].startswith('file://'):
410 with open(url['Url'].replace('file:///', '').replace('file://', ''), 'rb') as fd: