Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always redownloads firmware #43

Open
Blockmaster2706 opened this issue Nov 15, 2023 · 3 comments
Open

Always redownloads firmware #43

Blockmaster2706 opened this issue Nov 15, 2023 · 3 comments
Labels

Comments

@Blockmaster2706
Copy link

Just tried to use this using the latest windows release, and everytime I ran the install command, it told me that it could not find the firmware and downloaded it again, even though it already did.

image

@Eeems
Copy link
Collaborator

Eeems commented Nov 15, 2023

It looks like the logic to check what updates are already downloaded hasn't been updated to handle the changes for #29

@Jayy001
Copy link
Owner

Jayy001 commented Nov 21, 2023

Hi there, looking at this now

@alan-roe
Copy link

I'm looking at fixing this behaviour but have some questions around what the desired behaviour is. At the moment any files downloaded during the install command are removed after installation, which doesn't seem to always be what's desired.

It does make sense to me to perform cleanup on the remarkable for saving space, are there any other reasons? When remote we could store the files in the system's temporary directory and allow it to clean up the files when it wants to.

If we are to stick with the install command removing updates after installation then should we have the download command play nicer with the install one? For my use-case, I'd want it to work so that for any version x I can run codexctl download x then codexctl install x and that would simply work.

I also think that if an out directory is specified for the download command and that same directory is specified to serve from for the install command then these should also work together. At the moment it doesn't work this way.

My proposed flow for download and install would be as follows, I can start work on a PR to get it working this way if it seems desirable:

---
title: Download Flow
---
graph TD
    toOut[download to out folder]
    toDownDir[download to user Downloads/rm_updates]
    download -- out dir specified --> toOut
    download -- no out dir specified --> toDownDir
Loading
---
title: Install Flow
---
graph TD
	install[install]
    useServe[use serve dir]
    useSysTemp[use system temp dir]
    useTemp["use temp dir (cleanup after)"]
    useDl[use Downloads/rm_updates update]
    scanDl[scan Downloads/rm_updates for desired version]
    checkPlatform[are we remote?]
    install -- serve dir specified --> useServe
    install -- no serve folder specified --> scanDl -- doesn't exist 
    --> checkPlatform -- remarkable --> useTemp
    checkPlatform -- remote --> useSysTemp
    scanDl -- exists --> useDl

Loading

I'd appreciate any thoughts on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants