From e80850fe42c61d915162403a32cf20601ba61034 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Sun, 24 Jan 2021 13:02:00 -0500 Subject: [PATCH] linux-hardened: Fix update script --- pkgs/os-specific/linux/kernel/hardened/update.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/update.py b/pkgs/os-specific/linux/kernel/hardened/update.py index b831c6491095..e96ac9ca8554 100755 --- a/pkgs/os-specific/linux/kernel/hardened/update.py +++ b/pkgs/os-specific/linux/kernel/hardened/update.py @@ -101,7 +101,7 @@ def verify_openpgp_signature( def fetch_patch(*, name: str, release_info: ReleaseInfo) -> Optional[Patch]: release = release_info.release - extra = f'.{release_info.version[-1]}' + extra = f'-{release_info.version[-1]}' def find_asset(filename: str) -> str: try: @@ -138,7 +138,7 @@ def fetch_patch(*, name: str, release_info: ReleaseInfo) -> Optional[Patch]: def parse_version(version_str: str) -> Version: version: Version = [] - for component in version_str.split("."): + for component in re.split('\.|\-', version_str): try: version.append(int(component)) except ValueError: @@ -208,7 +208,7 @@ failures = False releases = {} for release in repo.get_releases(): version = parse_version(release.tag_name) - # needs to look like e.g. 5.6.3.a + # needs to look like e.g. 5.6.3-hardened1 if len(version) < 4: continue