[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ltib] How to force a package build if its PRECONFIG changed?
From: |
Peter Barada |
Subject: |
Re: [Ltib] How to force a package build if its PRECONFIG changed? |
Date: |
Mon, 21 Mar 2011 16:56:08 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 |
On 03/21/2011 03:56 PM, Peter Barada wrote:
> Stuart,
>
> How can I have "./ltib" force a rebuild of a package (kernel, busybox, etc)
> if the content of its PRECONFIG file changed? I.e. if I change the kernel or
> busybox .config file(i.e newer than the generated rpm file), how can i
> trigger a build of that package?
>
> I've gotten bitten by enabling CONFIG_FEATURE_IFCONFIG_HW in the
> busybox.config file I'm using and the automated build didn't detect that
> busybox needed to be rebuilt.
>
> I'll code it up and experimet, but I'm not sure how to get the dates for the
> preconfig and resultant rpm files(as my perl fu is weak).
>
> Any help is appreciated.
I think I've figured it out. Following in build_rpm looks to work (and handles
the case of a preconfig file being in either the platform or defaults
directory) after "my $dir_bld = ...":
my $preconfig_file = $pcf->{$key . "_PRECONFIG"};
my $preconfig_bld = 0;
if ( $preconfig_file ) {
my $dflts = "defaults";
if ( -f "$cf->{top}/$cf->{plat_dir}/$preconfig_file" ) {
$preconfig_file = "$cf->{top}/$cf->{plat_dir}/$preconfig_file";
} else {
if ( -f "${cf}->{config_dir}/$dflts/$preconfig_file" ) {
$preconfig_file = "${cf}->{config_dir}/$dflts/$preconfig_file";
}
}
if ( $rpms[0] && -f $rpms[0]) {
if ( -M $rpms[0] > -M $preconfig_file ) {
$preconfig_bld = 1;
}
}
}
And then adding:
$r .= "preconfig file changed, " if $preconfig_bld;
after "my $r = '';" in build_rpm()
Of course there may be a much more efficient way to do this, any suggestions
appreciated!
--
Peter Barada
address@hidden
Re: [Ltib] How to force a package build if its PRECONFIG changed?, Stuart Hughes, 2011/03/21