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

remove old archives from client cache dir #92

Open
dennisvang opened this issue Nov 15, 2023 · 0 comments · May be fixed by #160
Open

remove old archives from client cache dir #92

dennisvang opened this issue Nov 15, 2023 · 0 comments · May be fixed by #160
Assignees
Labels
enhancement New feature or request

Comments

@dennisvang
Copy link
Owner

dennisvang commented Nov 15, 2023

On the client side, update archives are downloaded by tuf.ngclient.Updater into the target_dir, which in our case is the client cache dir, see

target_dir=str(target_dir),

A newly downloaded archive is extracted during install, and must remain in place afterwards, to enable us to do a patch update for the next version.

This means that, after installation, only the latest archive, i.e. the one corresponding to the newly installed app version, is ever used.

However, the current implementation does not remove the older archives that are no longer used.

To prevent waste of storage space, we should remove these old archives and only keep the archive for the currently installed version.

If we were to accidentally remove the latest archive, no problem: that just means we cannot do a patch update.

We could check for, and remove, "stale" archives at the start of the update check, for example.

@dennisvang dennisvang self-assigned this Nov 15, 2023
@dennisvang dennisvang added the enhancement New feature or request label Nov 15, 2023
@JessicaTegner JessicaTegner linked a pull request Oct 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant