From 6167d34cb448f4842474ac05e79bd79e57ffb56d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 5 Oct 2015 14:33:19 +0200 Subject: 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. --- lib/kernel/src/inet_dns_record_adts.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/kernel') 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() { $" = ','; $\ = "\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; -- cgit v1.2.3