@@ -674,14 +674,16 @@ def collect_exts_file_info(self, fetch_files=True, verify_checksums=True):
674674 src_fn = os .path .basename (src_path )
675675
676676 # report both MD5 and SHA256 checksums, since both are valid default checksum types
677+ src_checksums = {}
677678 for checksum_type in (CHECKSUM_TYPE_MD5 , CHECKSUM_TYPE_SHA256 ):
678679 src_checksum = compute_checksum (src_path , checksum_type = checksum_type )
680+ src_checksums [checksum_type ] = src_checksum
679681 self .log .info ("%s checksum for %s: %s" , checksum_type , src_path , src_checksum )
680682
681683 # verify checksum (if provided)
682684 self .log .debug ('Verifying checksums for extension source...' )
683685 fn_checksum = self .get_checksum_for (checksums , filename = src_fn , index = 0 )
684- if verify_checksum (src_path , fn_checksum ):
686+ if verify_checksum (src_path , fn_checksum , src_checksums ):
685687 self .log .info ('Checksum for extension source %s verified' , src_fn )
686688 elif build_option ('ignore_checksums' ):
687689 print_warning ("Ignoring failing checksum verification for %s" % src_fn )
@@ -700,12 +702,15 @@ def collect_exts_file_info(self, fetch_files=True, verify_checksums=True):
700702 ext_src .update ({'patches' : ext_patches })
701703
702704 if verify_checksums :
705+ computed_checksums = {}
703706 for patch in ext_patches :
704707 patch = patch ['path' ]
708+ computed_checksums [patch ] = {}
705709 # report both MD5 and SHA256 checksums,
706710 # since both are valid default checksum types
707711 for checksum_type in (CHECKSUM_TYPE_MD5 , CHECKSUM_TYPE_SHA256 ):
708712 checksum = compute_checksum (patch , checksum_type = checksum_type )
713+ computed_checksums [patch ][checksum_type ] = checksum
709714 self .log .info ("%s checksum for %s: %s" , checksum_type , patch , checksum )
710715
711716 # verify checksum (if provided)
@@ -715,7 +720,7 @@ def collect_exts_file_info(self, fetch_files=True, verify_checksums=True):
715720 patch_fn = os .path .basename (patch )
716721
717722 checksum = self .get_checksum_for (checksums , filename = patch_fn , index = idx + 1 )
718- if verify_checksum (patch , checksum ):
723+ if verify_checksum (patch , checksum , computed_checksums [ patch ] ):
719724 self .log .info ('Checksum for extension patch %s verified' , patch_fn )
720725 elif build_option ('ignore_checksums' ):
721726 print_warning ("Ignoring failing checksum verification for %s" % patch_fn )
0 commit comments