IQ.Pilot Release Commit @ b79954e
This commit is contained in:
@@ -51,6 +51,8 @@ INSTALLER_DESTINATION_PATH = "/tmp/installer"
|
||||
INSTALLER_URL_PATH = "/tmp/installer_url"
|
||||
|
||||
GITHUB_FORK_URL = "https://github.com/{user}/openpilot.git"
|
||||
# IQ.Pilot lives on the IQ Lvbs git server; github.com/IQLvbs is DMCA'd and dead.
|
||||
GIT_URL_OVERRIDES = {"IQLvbs": "https://git.konn3kt.com/IQ.Lvbs/IQ.Pilot.git"}
|
||||
|
||||
CONTINUE = """#!/usr/bin/env bash
|
||||
|
||||
@@ -589,7 +591,7 @@ class Setup(Widget):
|
||||
pass
|
||||
|
||||
def _fork_install_thread(self, user: str, branch: str):
|
||||
git_url = GITHUB_FORK_URL.format(user=user)
|
||||
git_url = GIT_URL_OVERRIDES.get(user) or GITHUB_FORK_URL.format(user=user)
|
||||
label = f"{user}/{branch}"
|
||||
fail_msg = "Ensure the entered URL is valid, and the device's internet connection is good."
|
||||
try:
|
||||
@@ -609,7 +611,8 @@ class Setup(Widget):
|
||||
subprocess.run(["git", "-C", TMP_INSTALL_PATH, "submodule", "update", "--init"], check=False)
|
||||
|
||||
run_cmd(["rm", "-f", VALID_CACHE_PATH])
|
||||
run_cmd(["rm", "-rf", INSTALL_PATH])
|
||||
# sudo: a prior *run* install can leave root-owned .pyc here that a comma-user rm can't delete.
|
||||
run_cmd(["sudo", "rm", "-rf", INSTALL_PATH])
|
||||
run_cmd(["mv", TMP_INSTALL_PATH, INSTALL_PATH])
|
||||
|
||||
self._ble_progress("installing", 90)
|
||||
@@ -718,6 +721,11 @@ class Setup(Widget):
|
||||
# AGNOS might try to execute the installer before this process exits.
|
||||
# Therefore, important to close the fd before renaming the installer.
|
||||
os.close(fd)
|
||||
# comma's ELF installer does `rm -rf /data/openpilot` as the comma user and asserts it
|
||||
# succeeds; a prior *run* install leaves root-owned __pycache__ .pyc it can't delete, so it
|
||||
# aborts before continue.sh and bounces back to setup. Clear the old tree first (sudo) so the
|
||||
# installer's rm succeeds.
|
||||
subprocess.run(["sudo", "rm", "-rf", INSTALL_PATH], check=False)
|
||||
os.rename(tmpfile, INSTALLER_DESTINATION_PATH)
|
||||
|
||||
with open(INSTALLER_URL_PATH, "w") as f:
|
||||
|
||||
Reference in New Issue
Block a user