*** ltib 01 Feb 2011 04:42:12 -0500 1.74 --- ltib 22 Mar 2011 17:03:34 -0400 *************** *** 767,774 **** --- 767,807 ---- || ( $tok->{version} eq 'local' && $cf->{mode} eq 'buildrpms' && $rpms[0] && -f $rpms[0]); + + # Check if a preconfig file for a package changed + my $preconfig_file = $pcf->{$key . "_PRECONFIG"}; + my $preconfig_bld = 0; + if ( $preconfig_file ) { + # Check kernel preconfig files + my $f1 = "$cf->{top}/$cf->{plat_dir}/$preconfig_file"; + my $f2 = "$cf->{top}/$cf->{plat_dir}/$preconfig_file.dev"; + if ( -f $f1 && -f $f2) { + if ( -M $f1 > -M $f2 ) { + $preconfig_file = $f2; + } else { + $preconfig_file = $f1; + } + } else { + # Check busybox defaults/platform preconfig file + if ( -f "$cf->{top}/$cf->{plat_dir}/$preconfig_file" ) { + $preconfig_file = "$cf->{top}/$cf->{plat_dir}/$preconfig_file"; + } else { + if ( -f "${cf}->{config_dir}/defaults/$preconfig_file" ) { + $preconfig_file = "${cf}->{config_dir}/defaults/$preconfig_file"; + } + } + } + + if ( $rpms[0] && -f $rpms[0]) { + if ( -M $rpms[0] > -M $preconfig_file ) { + $preconfig_bld = 1; + } + } + } + my $spec_upd = @rpms && (-M $spec < -M $rpms[0]) && ! $cf->{hostinst}; my $r = ''; + $r .= "preconfig file changed, " if $preconfig_bld; $r .= "directory build, " if $dir_bld; $r .= "force set, " if $cf->{force}; $r .= "build key set, " if $$key->{build};