On Tue, Jan 14, 2014 at 01:58:59PM +0100, Jakub Wilk wrote: > Package: devscripts > Version: 2.13.9 > Severity: minor > > Order of flags in the rc-alert output is not deterministic:
Oops. Here's a patch for this. (Incidentally, should (I) now be wheezy-ignore or jessie-ignore, or does it still refer to squeeze?) Julian
--- /usr/bin/rc-alert 2013-12-23 20:31:35.000000000 +0000 +++ /tmp/rc-alert 2014-01-14 16:31:32.741120149 +0000 @@ -38,14 +38,14 @@ my $forcecache = 0; my $usecache = 0; -my %flagmap = ( '(P)' => "pending", - '.(\+)' => "patch", - '..(H)' => "help [wanted]", - '...(M)' => "moreinfo [needed]", - '....(R)' => "unreproducible", - '.....(S)' => "security", - '......(U)' => "upstream", - '.......(I)' => "wheezy-ignore or squeeze-ignore", +my @flagmap = ( ['(P)', "pending"], + ['.(\+)', "patch"], + ['..(H)', "help [wanted]"], + ['...(M)', "moreinfo [needed]"], + ['....(R)', "unreproducible"], + ['.....(S)', "security"], + ['......(U)', "upstream"], + ['.......(I)', "wheezy-ignore or squeeze-ignore"], ); # A little hacky but allows us to sort the list by length my %distmap = ( '(O)' => "oldstable", @@ -349,14 +349,15 @@ my $matchedexcludes = 0; my $applies = 1; - foreach my $flag ( sort { length $a <=> length $b } keys %flagmap ) { + foreach my $flagref (@flagmap) { + my ($flag, $fdesc) = @$flagref; if ($mrf =~ /^\[(?:$flag)/) { if ($excludetags =~ /\Q$1\E/) { $matchedexcludes++; } elsif ($includetags =~ /\Q$1\E/ or ! $includetags) { $matchedflags++; } - push @hrf, $flagmap{$flag}; + push @hrf, $fdesc; } } if ($excludetags and $tagexcoperation eq 'and' and