mirror of
https://github.com/RasppleII/a2server.git
synced 2025-01-10 19:29:54 +00:00
install-gsos.py: More robust digest checking
This commit is contained in:
parent
66a3648ef2
commit
ccb5196deb
@ -336,13 +336,17 @@ def a2setup_umount(mountpoint):
|
||||
|
||||
|
||||
def a2setup_check_digest(bootfile, file_digest, gsos_version, pristine=True, patched=True):
|
||||
if patched:
|
||||
if "patch" in bootfile and gsos_version in bootfile["patch"]:
|
||||
if bootfile["patch"][gsos_version]["digest"] == file_digest:
|
||||
return True
|
||||
else:
|
||||
# This file doesn't have a patch for this GS/OS version
|
||||
pristine = True
|
||||
|
||||
if pristine and bootfile["digest"] == file_digest:
|
||||
return True
|
||||
|
||||
if patched and "patch" in bootfile and gsos_version in bootfile["patch"]:
|
||||
if bootfile["patch"][gsos_version]["digest"] == file_digest:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user