linux-hardened: fix update script

We now have releases called `v5.19.x-hardened2` so make sure that the
update script doesn't stumble upon this.
This commit is contained in:
Maximilian Bosch 2022-09-17 15:27:58 +02:00
parent c2d301f7af
commit 80228b73e9
No known key found for this signature in database
GPG key ID: 9A6EEA275CA5BE0A

View file

@ -138,7 +138,7 @@ def fetch_patch(*, name: str, release_info: ReleaseInfo) -> Optional[Patch]:
if not sig_ok: if not sig_ok:
return None return None
kernel_ver = release_info.release.tag_name.replace("-hardened1", "") kernel_ver = re.sub(r"(.*)(-hardened[\d]+)$", r'\1', release_info.release.tag_name)
major = kernel_ver.split('.')[0] major = kernel_ver.split('.')[0]
sha256_kernel, _ = nix_prefetch_url(f"mirror://kernel/linux/kernel/v{major}.x/linux-{kernel_ver}.tar.xz") sha256_kernel, _ = nix_prefetch_url(f"mirror://kernel/linux/kernel/v{major}.x/linux-{kernel_ver}.tar.xz")