Skip to content

Commit

Permalink
Set descriptor_path directly to kuiper.json path
Browse files Browse the repository at this point in the history
Signed-off-by: Trecia Agoylo <[email protected]>
  • Loading branch information
tagoylo committed Jun 6, 2024
1 parent ddb80c6 commit c9bd53e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nebula/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def update_boot_partition_existing_files(self, subfolder=None):
descriptor_path = os.path.join(path, "resources", "kuiper.json")
try:
self._dl_file("/tmp/sdcard/kuiper.json")
os.replace("kuiper.json", descriptor_path)
descriptor_path = "kuiper.json"
except Exception:
log.warning("Cannot find project descriptor on target")

Expand Down
4 changes: 2 additions & 2 deletions nebula/usbmux.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def update_boot_files_from_sdcard_itself(
try:
kuiperjson_loc = os.path.join(mount_path, "kuiper.json")
os.path.isfile(kuiperjson_loc)
os.replace(kuiperjson_loc, descriptor_path)
descriptor_path = kuiperjson_loc
except Exception:
log.warning("Cannot find project descriptor on target")
boot_files_path = h.get_boot_files_from_descriptor(
Expand Down Expand Up @@ -385,7 +385,7 @@ def update_boot_files_from_sdcard_itself(
bootfile_name = "extlinux/" + bootfile_name
log.info(f"Copying {bootfile_name} from {bootfile_loc} to {mount_path}")
os.system(f"cp -f {bootfile_loc} /tmp/{folder}/{bootfile_name}")
os.system(f"sync")
os.system("sync")
time.sleep(0.5)

log.info("Updated boot files successfully... unmounting")
Expand Down

0 comments on commit c9bd53e

Please sign in to comment.