Skip to content

Conversation

kiwiroy
Copy link
Contributor

@kiwiroy kiwiroy commented Jul 13, 2023

When implementing a dynamic check_digest around hook it is called up to 3 times, depending on the value of Digest attributes check_fetch and check_download. I've seen that $build->extract does most of the rule enforcement of download_rule and thought this could benefit from a change against some low effort subversion such as the around_hook below. By the build stage there shouldn't be any opportunity to update the meta_prop->{digest}

use alienfile;
share {
  plugin Digest => {'*' => [SHA256 => 'x' x 64]};
  meta->around_hook(check_digest => sub { return 1; });
};

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

Successfully merging this pull request may close these issues.

1 participant