X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FStatus.pm;h=73506611a26d585da976a31576b1b7a9008cda8c;hb=759994a97a3e747305961b38eecd825d910e0c59;hp=f44f9fc4fbefdbb7114c95a7565e206c4cff568c;hpb=cebcfe4a025c588c5f9197b706a1b3c0ca61653e;p=debbugs.git diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm index f44f9fc..7350661 100644 --- a/Debbugs/Status.pm +++ b/Debbugs/Status.pm @@ -276,7 +276,7 @@ sub read_bug{ my $status_modified = (stat($status))[9]; # Add log last modified time - $data{log_modified} = (stat($log))[9]; + $data{log_modified} = (stat($log))[9] // (stat("${log}.gz"))[9]; $data{last_modified} = max($status_modified,$data{log_modified}); $data{location} = $location; $data{archived} = (defined($location) and ($location eq 'archive'))?1:0; @@ -512,12 +512,14 @@ sub lock_read_all_merged_bugs { push @data,$newdata; # perform a sanity check to make sure that the merged bugs # are all merged with eachother - my $expectmerge= join(' ',grep {$_ != $bug } sort { $a <=> $b } @bugs); + # We do a cmp sort instead of an <=> sort here, because that's + # what merge does + my $expectmerge= join(' ',grep {$_ != $bug } sort @bugs); if ($newdata->{mergedwith} ne $expectmerge) { for (1..$locks) { unfilelock(exists $param{locks}?$param{locks}:()); } - die "Bug $param{bug} differs from bug $bug: ($newdata->{bug_num}: '$newdata->{mergedwith}') vs. ('$expectmerge') (".join(' ',@bugs).")"; + die "Bug $param{bug} mergedwith differs from bug $bug: ($newdata->{bug_num}: '$newdata->{mergedwith}') vs. ('$expectmerge') (".join(' ',@bugs).")"; } } } @@ -730,9 +732,9 @@ sub addfoundversions { my $version = shift; my $isbinary = shift; return unless defined $version; - undef $package if $package =~ m[(?:\s|/)]; + undef $package if defined $package and $package =~ m[(?:\s|/)]; my $source = $package; - if ($package =~ s/^src://) { + if (defined $package and $package =~ s/^src://) { $isbinary = 0; $source = $package; }