]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Status.pm
* pass on status to bug_presence
[debbugs.git] / Debbugs / Status.pm
index 52e28edf9573f22ad12d6a126ff0a8a84d8e0cad..72b040f545a2879759d704eaa052227ee4da2c6d 100644 (file)
@@ -631,6 +631,16 @@ sub bug_archiveable{
          print STDERR "Cannot archive $param{bug} because it is not done\n" if $DEBUG;
          return $cannot_archive
      }
+     # Check to make sure that the bug has none of the unremovable tags set
+     if (@{$config{removal_unremovable_tags}}) {
+         for my $tag (split ' ', ($status->{tags}||'')) {
+              if (grep {$tag eq $_} @{$config{removal_unremovable_tags}}) {
+                   print STDERR "Cannot archive $param{bug} because it has an unremovable tag '$tag'\n" if $DEBUG;
+                   return $cannot_archive;
+              }
+         }
+     }
+
      # If we just are checking if the bug can be archived, we'll not even bother
      # checking the versioning information if the bug has been -done for less than 28 days.
      my $log_file = getbugcomponent($param{bug},'log');
@@ -869,7 +879,8 @@ sub get_bug_status {
      $status{"pending"} = 'fixed'          if ($tags{fixed});
 
 
-     my $presence = bug_presence(map{(exists $param{$_})?($_,$param{$_}):()}
+     my $presence = bug_presence(status => \%status,
+                                map{(exists $param{$_})?($_,$param{$_}):()}
                                 qw(bug sourceversions arch dist version found fixed package)
                                );
      if (defined $presence) {