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

Take use_existing_fileinfo kwarg in write and writeall methods #1004

Closed
lukpueh opened this issue Mar 18, 2020 · 1 comment
Closed

Take use_existing_fileinfo kwarg in write and writeall methods #1004

lukpueh opened this issue Mar 18, 2020 · 1 comment

Comments

@lukpueh
Copy link
Member

lukpueh commented Mar 18, 2020

Description of issue or feature request:
Targets file hashes stored in targets metadata currently are generated ad-hoc when calling repository tool's write or writeall methods, requiring the corresponding targets file to be available at that time.

To make the tool more flexible (e.g. for PEP458) it should be possible to use previously (out-of-band) generated hashes that were already added to the roledb (see #1003).

Current behavior:
When calling repository tool's write or writeall, tuf generate hashes for all relevant target files in the roledb.

Expected behavior:
write and writeall should take an optional use_existing_fileinfo kwarg, which skips the hashing of target files in underlying functions () and instead uses the fileinfo in roledb (*), failing if not available.

(**) stacktrace is:
write/writeall --> repository_lib._generate_and_write_metadata --> repository_lib.generate_targets_metadata

(***) Depends on roledb changes through #1003

@lukpueh
Copy link
Member Author

lukpueh commented Apr 1, 2020

Fixed in #1007

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

No branches or pull requests

1 participant