kconfig check: extract_version: replace - with _
Replace the dash in rc kernels with an underscore, so the resulting version of e.g. 6.1.0-rc3 becomes a valid alpine pkgver (6.1.0_rc3). This is needed so pmbootstrap can properly parse and compare the version. Reviewed-by: Clayton Craft <clayton@craftyguy.net> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230312151325.1968-11-ollieparanoid@postmarketos.org%3E
This commit is contained in:
parent
f393bbdab1
commit
905ccbb840
|
@ -304,7 +304,7 @@ def extract_version(config_path):
|
|||
text = [next(f) for x in range(3)][2]
|
||||
ver_match = re.match(r"# Linux/\S+ (\S+) Kernel Configuration", text)
|
||||
if ver_match:
|
||||
return ver_match.group(1)
|
||||
return ver_match.group(1).replace("-", "_")
|
||||
|
||||
# No match
|
||||
logging.info("WARNING: failed to extract version from kernel config")
|
||||
|
|
Loading…
Reference in New Issue