[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: Tue, 22 Mar 2011 17:10:19 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110223 Thunderbird/3.1.8

On 03/22/2011 04:54 PM, Stuart Hughes wrote:
> 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.
Stuart,  Attached.

Note that my ltib script is different than what's in CVS as I have other 
changes in place to support SVN builds.

This patch is against the CVS version, using the bits I added into my ltib 
script.  I've updated it to handle changes in kernel configuration files 
(either the platform .config, or platform, and have tested it (in 
my LTIB script) with both the kernel and busybox in my buildbot universe.  I 
haven't tested the CVS version of LTIB (as my project is a bit behind that 
version), but feel it should work.

On a separate note, how can I have ltib read in a file (that contains build 
dependencies, list of variables to export into the shell environment, etc) and 
incorporate it into ltib's perl environment such that my platform can define 
extra package build dependencies, environment variables, etc w/o having to hack 
up the ltib script itself?

> Regards, Stuart

Peter Barada

Attachment: LTIB-rebuild-preconfig-changed.patch
Description: Text Data

reply via email to

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