Faster NEOS download and auto removal of NEOS image after installation (#478)

old-commit-hash: 4610a6e4d4
commatwo_master
rbiasini 6 years ago committed by GitHub
parent 444dc0a761
commit ecb486d74f
  1. 4
      installer/updater/updater
  2. 9
      selfdrive/manager.py

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:32706ce66da7e33d299597ad1ecfccf6f1d2b0c03769f2a6efa90be23019c890 oid sha256:4e8c704ed800b27d8ac0dda64aafcbc93239012ab65f3ac7540db5965844b2f0
size 2505704 size 2501608

@ -41,9 +41,9 @@ def unblock_stdout():
os._exit(os.wait()[1]) os._exit(os.wait()[1])
if __name__ == "__main__": if __name__ == "__main__":
if os.path.isfile("/init.qcom.rc") \ neos_update_required = os.path.isfile("/init.qcom.rc") \
and (not os.path.isfile("/VERSION") or int(open("/VERSION").read()) < 8): and (not os.path.isfile("/VERSION") or int(open("/VERSION").read()) < 8)
if neos_update_required:
# update continue.sh before updating NEOS # update continue.sh before updating NEOS
if os.path.isfile(os.path.join(BASEDIR, "scripts", "continue.sh")): if os.path.isfile(os.path.join(BASEDIR, "scripts", "continue.sh")):
from shutil import copyfile from shutil import copyfile
@ -54,6 +54,9 @@ if __name__ == "__main__":
subprocess.check_call(["git", "clean", "-xdf"], cwd=BASEDIR) subprocess.check_call(["git", "clean", "-xdf"], cwd=BASEDIR)
os.system(os.path.join(BASEDIR, "installer", "updater", "updater")) os.system(os.path.join(BASEDIR, "installer", "updater", "updater"))
raise Exception("NEOS outdated") raise Exception("NEOS outdated")
elif os.path.isdir("/data/neoupdate"):
from shutil import rmtree
rmtree("/data/neoupdate")
unblock_stdout() unblock_stdout()

Loading…
Cancel
Save