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

Improve robustness of the remove-latest cli command #157

Open
dennisvang opened this issue Sep 21, 2024 · 0 comments · May be fixed by #159
Open

Improve robustness of the remove-latest cli command #157

dennisvang opened this issue Sep 21, 2024 · 0 comments · May be fixed by #159
Assignees
Labels
enhancement New feature or request

Comments

@dennisvang
Copy link
Owner

dennisvang commented Sep 21, 2024

To roll back a release, we can call tufup targets remove-latest.

This takes care of the following:

  1. remove the target entries for the latest release from targets.json
  2. remove the actual target files from the repository's targets dir
  3. re-sign targets.json, snapshot.json, and timestamp.json

In some cases, we may have already removed the target files, or we are reconstructing a repo just to update the metadata, and do not want to download the actual target files.

However, if the target files are not present, the remove-latest command fails with a FileNotFoundError.

A workaround is to create an empty "dummy" file at the specified path, but that is inconvenient.

To make the command more robust, we should catch the FileNotFoundError, show a warning, and continue with the metadata update.

@dennisvang dennisvang added the enhancement New feature or request label Sep 21, 2024
@dennisvang dennisvang self-assigned this Sep 21, 2024
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