richard pushed to branch main at The Tor Project / Applications / RBM
Commits:
-
c4c1716d
by Nicolas Vigier at 2023-09-06T15:30:45+02:00
2 changed files:
Changes:
... | ... | @@ -113,6 +113,7 @@ refresh_input:: |
113 | 113 | sha256sum::
|
114 | 114 | The sha256 checksum of the file. The build will fail with an
|
115 | 115 | error if the file does not match the expected sha256 checksum.
|
116 | + If the value is empty, the checksum is not checked.
|
|
116 | 117 | |
117 | 118 | file_gpg_id::
|
118 | 119 | If this option is set to 1, the file is checked for a gpg
|
... | ... | @@ -782,14 +782,17 @@ sub input_file_need_dl { |
782 | 782 | return undef if $action eq 'getfpaths';
|
783 | 783 | if ($fname
|
784 | 784 | && ($input_file->{sha256sum} || $input_file->{norec}{sha256sum})
|
785 | + && $t->('sha256sum')
|
|
785 | 786 | && $t->('sha256sum') ne sha256file($fname)) {
|
786 | 787 | sha256file($fname, { remove_cache => 1 });
|
787 | 788 | $fname = undef;
|
788 | 789 | }
|
789 | 790 | if ($action eq 'input_files_id') {
|
790 | 791 | return undef if $input_file->{input_file_id};
|
791 | - return undef if $input_file->{sha256sum};
|
|
792 | - return undef if $input_file->{norec}{sha256sum};
|
|
792 | + if ( ($input_file->{sha256sum} || $input_file->{norec}{sha256sum})
|
|
793 | + && $t->('sha256sum') ) {
|
|
794 | + return undef;
|
|
795 | + }
|
|
793 | 796 | return undef if $input_file->{exec};
|
794 | 797 | return undef if $fname;
|
795 | 798 | return 1 if $input_file->{URL};
|
... | ... | @@ -814,7 +817,8 @@ sub input_file_id { |
814 | 817 | my ($input_file, $t, $fname, $filename) = @_;
|
815 | 818 | return $t->('input_file_id') if $input_file->{input_file_id};
|
816 | 819 | return $input_file->{project} . ':' . $filename if $input_file->{project};
|
817 | - if ($input_file->{sha256sum} || $input_file->{norec}{sha256sum}) {
|
|
820 | + if ( ($input_file->{sha256sum} || $input_file->{norec}{sha256sum})
|
|
821 | + && $t->('sha256sum') ) {
|
|
818 | 822 | return $filename . ':' . $t->('sha256sum');
|
819 | 823 | }
|
820 | 824 | my $opts = { norec => { output_dir => '/out', getting_id => 1, }};
|