Fixes https://bugs.gnu.org/25629.
* bin/aclocal.in: sort keys for reproducibility.
* bin/automake.in: likewise.
* contrib/tap-driver.pl: likewise.
* lib/Automake/Channels.pm: likewise.
* lib/Automake/Condition.pm: likewise.
* lib/Automake/DisjConditions.pm: likewise.
* lib/Automake/Getopt.pm: likewise.
* lib/Automake/Rule.pm: likewise.
* THANKS: Add Yves.
* NEWS: mention this.
that can show up on network file systems.
(https://lists.gnu.org/archive/html/automake/2022-09/msg00002.html)
- - tests: avoid some declaration conflicts for lex et al. on SunOS.
- (bug#34151 and others)
-
- Pass any options given to AM_PROG_LEX on to AC_PROG_LEX.
(bug#65600, bug#65730)
+ - Hash iterations with external effects now consistently sort keys.
+ (bug#25629)
+
+ - tests: avoid some declaration conflicts for lex et al. on SunOS.
+ (bug#34151 and others)
+
- Typos in code and other doc fixes. (bug#68003, bug#68004, et al.)
* Obsolescence:
William S Fulton wsf@fultondesigns.co.uk
Yann Droneaud ydroneaud@meuh.eu.org
Younes Younes younes@cs.tu-berlin.de
+Yves Orton demerphq@gmail.com
Zack Weinberg zack@owlfolio.org
Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl
Zoltan Rado z.rado@chello.hu
# Check macros in acinclude.m4. If one is not used, warn.
sub check_acinclude ()
{
- foreach my $key (keys %map)
+ foreach my $key (sort keys %map)
{
# FIXME: should print line number of acinclude.m4.
msg ('syntax', "macro '$key' defined in acinclude.m4 but never used")
# Do not trace $1 for all other macros as we do
# not need it and it might contains harmful
# characters (like newlines).
- (map { "--trace='$_:\$f::\$n'" } (keys %macro_seen)));
+ (map { "--trace='$_:\$f::\$n'" } (sort keys %macro_seen)));
verb "running WARNINGS=$ENV{WARNINGS} $traces $configure_ac";
"-I options nor AC_CONFIG_MACRO_DIR{,S} m4 macro(s)";
}
- last if write_aclocal ($output_file, keys %macro_traced);
+ last if write_aclocal ($output_file, sort keys %macro_traced);
last if $dry_run;
}
check_acinclude;
# suffix rule was learned), don't bother with the C stuff. But if
# anything else creeps in, then use it.
my @languages_seen = map { $languages{$extension_map{$_}}->name }
- (keys %extension_seen);
+ (sort keys %extension_seen);
@languages_seen = uniq (@languages_seen);
$needs_c = 1 if @languages_seen > 1;
if ($need_link || $needs_c)
my $trans_mans = $have_trans || exists $trans_sections{$section};
my (%notrans_this_sect, %trans_this_sect);
my $expr = 'man' . $section . '_MANS';
- foreach my $varname (keys %notrans_sect_vars)
+ foreach my $varname (keys %notrans_sect_vars) # sort keys not needed
{
if ($varname =~ /$expr/)
{
$notrans_this_sect{$varname} = 1;
}
}
- foreach my $varname (keys %trans_sect_vars)
+ foreach my $varname (keys %trans_sect_vars) # sort keys not needed
{
if ($varname =~ /$expr/)
{
# Whether the test script should be re-run by "make recheck".
sub must_recheck ()
{
- return grep { !/^(?:XFAIL|PASS|SKIP)$/ } (keys %test_results_seen);
+ return grep { !/^(?:XFAIL|PASS|SKIP)$/ } (sort keys %test_results_seen);
}
# Whether the content of the log file associated to this test should
# be copied into the "global" test-suite.log.
sub copy_in_global_log ()
{
- return grep { not $_ eq "PASS" } (keys %test_results_seen);
+ return grep { not $_ eq "PASS" } (sort keys %test_results_seen);
}
sub get_global_test_result ()
{
my ($ref) = @_;
my $dup = 0;
- foreach my $k (keys %$ref)
+ foreach my $k (keys %$ref) # sort keys not needed
{
$dup += $ref->{$k};
}
my ($hash, %options) = @_;
local $_;
- foreach (keys %options)
+ foreach (sort keys %options)
{
if (exists $hash->{$_})
{
sub setup_channel_type ($%)
{
my ($type, %opts) = @_;
- foreach my $channel (keys %channels)
+ foreach my $channel (sort keys %channels)
{
setup_channel $channel, %opts
if $channels{$channel}{'type'} eq $type;
sub dup_channel_setup ()
{
my %channels_copy;
- foreach my $k1 (keys %channels)
+ foreach my $k1 (keys %channels) # sort keys not needed
{
$channels_copy{$k1} = {%{$channels{$k1}}};
}
sub setup_channel_queue ($$)
{
my ($queue, $key) = @_;
- foreach my $channel (keys %channels)
+ foreach my $channel (sort keys %channels)
{
setup_channel $channel, queue => $queue, queue_key => $key
if $channels{$channel}{'ordered'};
sub conds ($ )
{
my ($self) = @_;
- my @conds = keys %{$self->{'hash'}};
+ my @conds = sort keys %{$self->{'hash'}};
return ("TRUE") unless @conds;
- return sort @conds;
+ return @conds;
}
# Undocumented, shouldn't be needed outside of this class.
sub true ($ )
{
my ($self) = @_;
- return 0 == keys %{$self->{'hash'}};
+ return 0 == keys %{$self->{'hash'}}; # sort not needed
}
=item C<$cond-E<gt>string>
sub false ($ )
{
my ($self) = @_;
- return 0 == keys %{$self->{'hash'}};
+ return 0 == keys %{$self->{'hash'}}; # sort keys not needed
}
=item C<$et = $set-E<gt>true>
if (@ARGV && $ARGV[0] =~ /^-./)
{
my %argopts;
- for my $k (keys %option)
+ for my $k (keys %option) # sort keys not needed
{
if ($k =~ /(.*)=s$/)
{
# we know how to transform $src in that "something else".
if (exists $suffix_rules->{$dest})
{
- for my $dest2 (keys %{$suffix_rules->{$dest}})
+ for my $dest2 (sort keys %{$suffix_rules->{$dest}})
{
my $dist = $suffix_rules->{$dest}{$dest2}[1] + 1;
# Overwrite an existing $src->$dest2 path only if
# Similarly, any extension that can be derived into $src
# can be derived into the same extensions as $src can.
- my @dest2 = keys %{$suffix_rules->{$src}};
- for my $src2 (keys %$suffix_rules)
+ my @dest2 = sort keys %{$suffix_rules->{$src}};
+ for my $src2 (sort keys %$suffix_rules)
{
if (exists $suffix_rules->{$src2}{$src})
{