Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Take use_existing_fileinfo kwarg in write and writeall methods #1004

Copy link
Copy link
@lukpueh

Description

@lukpueh
Issue body actions

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

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.