id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,lang,patch,platform
1263,Determine configuration value for 'platform' prior to gen::platform,jkeenan,jkeenan,"This ticket picks up an idea originally discussed in [https://trac.parrot.org/parrot/ticket/1194#comment:8 TT #1194].  Parrot configuration step `gen::platform` creates platform-specific files.  It contains logic to determine what value the string for ''platform'' should hold.
{{{
 65 sub _get_platform {
 66     my $self = shift;
 67     my ($conf, $verbose) = @_;
 68     my $platform = lc ( $conf->data->get_p5('OSNAME') );
 69 
 70     $platform = ""win32"" if $platform =~ /^msys/;
 71     $platform = ""win32"" if $platform =~ /^mingw/;
 72     $platform =~ s/^ms//;
 73 
 74     if ( ( split m/-/, $conf->data->get_p5('archname'), 2 )[0] eq 'ia64' ) {
 75         $platform = 'ia64';
 76     }
 77 
 78     $platform = 'generic' unless -d ""config/gen/platform/$platform"";
 79 
 80     print "" platform='$platform' "" if $verbose;
 81     return $platform;
 82 }
}}}

The fact that we are only determining this value in the second-last configuration step is inconsistent with the design (such as it is) of our configuration system.  Parrot configuration values ought to be determined in `init`, `inter`, or `auto` steps.  The `gen` steps should not be making any determinations of config values.  Rather, they should simply be spitting out files based on values determined in steps of the first three types.

It would be better if a value for ''platform'' were determined much earlier in the configuration process -- most likely in ''config/auto/arch.pm'', as that is the place where `cpuarch` and `osname` get their final determination.  (True, there may be shortcomings in the way `auto::arch` determines those values; cf. TT #423.  But that does not gainsay the point of this ticket.)

I will create a branch to develop and test this feature revision.

Thank you very much.

kid51",cage,closed,normal,,configure,1.7.0,medium,fixed,platform,,,applied,all
