diff options
author | Björn Gustavsson <[email protected]> | 2015-10-05 14:33:19 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-10-05 14:56:21 +0200 |
commit | 6167d34cb448f4842474ac05e79bd79e57ffb56d (patch) | |
tree | d12418beb194c68a41127dfb3b1b446de89551d8 /lib | |
parent | 4c8723f377b6db8e9899c4192887284feb3c3cf4 (diff) | |
download | otp-6167d34cb448f4842474ac05e79bd79e57ffb56d.tar.gz otp-6167d34cb448f4842474ac05e79bd79e57ffb56d.tar.bz2 otp-6167d34cb448f4842474ac05e79bd79e57ffb56d.zip |
Avoid always updating inet_dns in the primary bootstrap
The include file inet_dns_record_adts.hrl is generated by the
Perl script inet_dns_record_adts.pl in a non-deterministic way.
That is, every time the script is run, the functions will be in
a different order. That will cause inet_dns.beam in the primary
bootstrap to be updated every time the bootstrap is updated,
even though there is no actual code change.
Modify the Perl script to sort the keys pulled out from hashes
to make the order deterministic.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel/src/inet_dns_record_adts.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/kernel/src/inet_dns_record_adts.pl b/lib/kernel/src/inet_dns_record_adts.pl index 657d2b9d35..6d719d836e 100644 --- a/lib/kernel/src/inet_dns_record_adts.pl +++ b/lib/kernel/src/inet_dns_record_adts.pl @@ -57,7 +57,8 @@ while(<DATA>) { $" = ','; $\ = "\n"; -while( my ($Name, $r) = each(%Names)) { +foreach my $Name (sort keys %Names) { + my $r = $Names{$Name}; # Create substitutions for this Name my ($Record, @Fields) = @{ $r }; my @FieldMatchValues; @@ -110,7 +111,8 @@ while( my ($Name, $r) = each(%Names)) { for my $i ( 0 .. $#INDEX ) { my $line = $INDEX[$i]; if ($line =~ s/^[*]//) { - while( my ($Name, $r) = each(%Names)) { + foreach my $Name (sort keys %Names) { + my $r = $Names{$Name}; my ($Record) = @{ $r }; $_ = $line; s/Name\b/$Name/g; |