- Timestamp:
- Apr 11, 2023, 11:00:58 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/check_md5s_dateobs.pl
r42444 r42447 59 59 60 60 # if these do not match, complain and move on 61 # we are allowed to have more MD5s than instances: some instances 62 # may have been culled during this process (but the MD5s stay behind) 61 63 my $N1 = @md5data; 62 64 my $N2 = @instdata; 63 if ($N1 !=$N2) {64 print STDOUT " inconsistent number of lines in$md5match : $N1 vs $N2\n";65 if ($N1 < $N2) { 66 print STDOUT "not enough MD5s $md5match : $N1 vs $N2\n"; 65 67 $Nfail ++; 66 68 next; 67 69 } 68 70 71 # set up an empty hash for the instance names: 72 my %instfound = (); 73 foreach my $line (@instdata) { 74 chomp $line; 75 my @words = split (/\s+/,$line); 76 my $inst = $words[0]; 77 $instfound{$inst} = 0; 78 } 79 69 80 # check for mismatched MD5sums 81 # we are not checking that all instances in the inst file are in the MD5 file 70 82 foreach my $line (@md5data) { 71 83 … … 80 92 my $md5tru = $words[2]; 81 93 my $md5obs = $words[3]; 94 95 unless (defined $instfound{$inst}) { print "skip md5 for removed instance $inst\n"; next; } 96 $instfound{$inst} = 1; 82 97 83 98 if ($md5tru ne $md5obs) { … … 88 103 if ($DEBUG > 2) { print STDOUT "$inst $state $md5tru = $md5obs\n"; } 89 104 } 105 } 106 107 my @instfoundKEYS = keys %instfound; 108 foreach my $inst (@instfoundKEYS) { 109 unless ($instfound{$inst}) { die "missing MD5 for instance $inst\n"; } 90 110 } 91 111 }
Note:
See TracChangeset
for help on using the changeset viewer.
