mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 12:04:40 +00:00
crosvm.updateScript: check for . in buildspec name
Otherwise, we might only match a prefix of the version. (Although it's not likely to be a problem in practice — I doubt we'll end up in a situation where there's a buildspec number 10x the one we're looking for.)
This commit is contained in:
parent
11ffcf0fdf
commit
931ae3ee7b
@ -48,7 +48,7 @@ chromeos_tip_build = re.match(r'\d+', platform_version)[0]
|
||||
with urlopen(f'{buildspecs_url}{chrome_major_version}/?format=TEXT') as resp:
|
||||
listing = base64.decodebytes(resp.read()).decode('utf-8')
|
||||
buildspecs = [(line.split('\t', 1)[1]) for line in listing.splitlines()]
|
||||
buildspecs = [s for s in buildspecs if s.startswith(chromeos_tip_build)]
|
||||
buildspecs = [s for s in buildspecs if s.startswith(f"{chromeos_tip_build}.")]
|
||||
buildspecs.sort(reverse=True)
|
||||
buildspec = splitext(buildspecs[0])[0]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user