You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by st...@apache.org on 2015/04/01 18:37:21 UTC

svn commit: r1670723 - /perl/Apache-Test/trunk/lib/Apache/TestConfig.pm

Author: stevehay
Date: Wed Apr  1 16:37:20 2015
New Revision: 1670723

URL: http://svn.apache.org/r1670723
Log:
Fix a bunch of places where the mod_perl build process is non-deterministic due to hash randomisation. This affects the order of some build steps, order of items on some command lines, Makefile structure, and generated .xs and .pm files.

Patch by Zefram <ze...@fysh.org> from rt.cpan.org #102902.

Modified:
    perl/Apache-Test/trunk/lib/Apache/TestConfig.pm

Modified: perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/lib/Apache/TestConfig.pm?rev=1670723&r1=1670722&r2=1670723&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfig.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfig.pm Wed Apr  1 16:37:20 2015
@@ -153,7 +153,7 @@ sub passenv {
 sub passenv_makestr {
     my @vars;
 
-    for (keys %passenv) {
+    for (sort keys %passenv) {
         push @vars, "$_=\$($_)";
     }
 
@@ -1124,7 +1124,7 @@ sub clean {
     $self->cmodules_clean;
     $self->sslca_clean;
 
-    for (keys %{ $self->{clean}->{files} }) {
+    for (sort keys %{ $self->{clean}->{files} }) {
         if (-e $_) {
             debug "unlink $_";
             unlink $_;
@@ -1620,7 +1620,7 @@ sub generate_httpd_conf {
     # but wasn't included in the system-wide httpd.conf
 
     print $out "<IfModule mod_alias.c>\n";
-    for (keys %aliases) {
+    for (sort keys %aliases) {
         next unless $vars->{$aliases{$_}};
         print $out "    Alias /getfiles-$_ $vars->{$aliases{$_}}\n";
     }
@@ -1672,7 +1672,7 @@ sub need_reconfiguration {
     # last run and thus avoid the reconfiguration?
     {
         my $passenv = passenv();
-        if (my @env_vars = grep { $ENV{$_} } keys %$passenv) {
+        if (my @env_vars = sort grep { $ENV{$_} } keys %$passenv) {
             push @reasons, "environment variables (@env_vars) are set";
         }
     }