ltib
[Top][All Lists]
Advanced

[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: Stuart Hughes
Subject: Re: [Ltib] How to force a package build if its PRECONFIG changed?
Date: Tue, 22 Mar 2011 20:54:12 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7

On 21/03/11 20:56, Peter Barada wrote:
> 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!
> 
Hi Peter,

Our emails crossed in mid-foo. What you have above looks good.  If you
can integrate and test it, and send a patch, I'll get it merged.

Regards, Stuart



reply via email to

[Prev in Thread] Current Thread [Next in Thread]