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
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
with urlopen(f'{buildspecs_url}{chrome_major_version}/?format=TEXT') as resp:
|
||||||
listing = base64.decodebytes(resp.read()).decode('utf-8')
|
listing = base64.decodebytes(resp.read()).decode('utf-8')
|
||||||
buildspecs = [(line.split('\t', 1)[1]) for line in listing.splitlines()]
|
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)
|
buildspecs.sort(reverse=True)
|
||||||
buildspec = splitext(buildspecs[0])[0]
|
buildspec = splitext(buildspecs[0])[0]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue