On 07/29/2013 03:03 PM, Mike Goins wrote:
> On Mon, Jul 29, 2013 at 2:18 PM, Peter Barada <[email protected]> wrote:
>> On 07/29/2013 02:03 PM, Mike Goins wrote:
>>> I'm having an issue in kernel-common.tmpl with the preconfig and the
>>> existence of the .dev file.
>>>
>>> If the .dev file exists then it gets set as the CFG:
>>>
>>> for CFG in "$PLATFORM_PATH/${PKG_KERNEL_PRECONFIG}.dev"
>>> "$PLATFORM_PATH/$PKG_KERNEL_PRECONFIG"
>>> do
>>> if [ -f $CFG ]
>>> then
>>> CFG_PATH=$CFG
>>> break
>>> fi
>>> done
>>> <snip>
>>> cp -f $CFG_PATH $KBOUT/.config
>>> <snip>
>>> yes "" | make ARCH=$LINTARCH HOSTCC="$BUILDCC" oldconfig
>>>
>>> This ends up rebuilding the kernel based on the .dev file and not the
>>> PRECONFIG since the .dev file exists. We are not tracking .dev files
>>> in version control, so this process is not using an updated PRECONFIG
>>> that may arrive in version control. Continuous integration systems
>>> noticeably are being affected.
>>>
>>> Has anyone else run into this? Tracking the .dev file looks like it
>>> may fix this, but I'd prefer that as a last resort. Anything wrong
>>> with testing the time-stamps of the PRECONFIG and .dev file and using
>>> the PRECONFIG if it is newer? What if I changed the order in the "for
>>> CFG in"?
>> Don't change the order, or any user configuration changes (made by
>> "./ltib -c") won't take effect...
>>
>> You best bet for continuous integration is to first remove any *.dev
>> files from the platform directory and then force the selection of a
>> preconfig file. I.E. run the following script to do a CIS build:
>>
>> #/bin/sh
>> PLATFORM="<platform>"
>> rm -rf config/platform/$platform/*.dev
>> ./ltib -b --preconfig config/platform/$platform/defconfig
>>
> Nice simple solution. And it works. Thanks
>
>
>> Better would be modify the ltib script to add a "--remove_dev_files"
>> option that removes the platform *.dev files near the start of its
>> processing after identifying the platform.
>
> What about making "--remove_dev_files" implicit in "--preconfig"?
The underlying issue is that the .dev files are used both for the
platform configuration and kernel packages. Sometimes I want to use a
kernel with local configuration changes but with different package mix
for testing (i.e. I have multiple defconfigs to cover different package
mixes, all referring to one common kernel/kernel config). I can use
--preconfig to build the different package/configuration mixes from the
command line.
On my CIS system I've modified the ltib script to add
"--remove_dev_files" and use it to do what I need there (i.e. forcibly
build a SCM revision point from a known configuration). attached is a
patch to current CVS ltib (I pulled the changes from my CIS ltib script
that a bunch of other local changes in it), so give it a whirl
(preferably in a test tree you don't mind trashing if I made a mistake)...
--
Peter Barada
[email protected]
*** ltib.~1.91.~ 2013-06-22 10:50:13.000000000 -0400
--- ltib 2013-07-29 15:35:05.723931604 -0400
***************
*** 200,205 ****
--- 200,206 ----
help => 0,
clobber => 0,
need_frb => 0
+ remove_dev_files => 0,
};
use strict 'vars';
***************
*** 355,360 ****
--- 356,363 ----
--batch|b : batch mode, assume yes to all questions
--force|f : force rebuilds even if they are up to date
--clobber|K : clobber a package build source if its specfile is updated
+ --remove_dev_files : remove *.dev files in platform to force
+ using default configuration
--reinstall|e : re-install rpms (but don't force rebuild)
--erase|E : remove (erase) rpm
--nodeps|n : turn off install/uninstall dependency checks
***************
*** 412,417 ****
--- 415,421 ----
"batch|b" => \$cf->{batch},
"force|f" => \$cf->{force},
"clobber|K" => \$cf->{clobber},
+ "remove_dev_files" => \$cf->{remove_dev_files},
"reinstall|e"=> \$cf->{reinstall},
"erase|E" => \$cf->{erase},
"nodeps|n" => \$cf->{nodeps},
***************
*** 568,573 ****
--- 572,584 ----
# get/set the platform directory
$cf->{plat_dir} = get_plat_dir() or die;
+ # if remove_dev_files then clean out all files in config that end in .dev
+ # to prevent them from overriding the configuration we have
+ if( $cf->{remove_dev_files} ) {
+ print "Removing all .dev files in $cf->{plat_dir}\n";
+ system_nb("rm -rf $cf->{plat_dir}/*.dev");
+ }
+
my @rl = build_root_list();
foreach my $n (reverse @rl) {
print "\nProcessing root number: ", $n+1, " of ", $#rl+1, "\n",
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/ltib