[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ltib] PKG_KERNEL_LEAVSRC issues...
From: |
Peter Barada |
Subject: |
Re: [Ltib] PKG_KERNEL_LEAVSRC issues... |
Date: |
Mon, 20 Dec 2010 11:57:12 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 |
On 12/20/2010 04:35 AM, address@hidden wrote:
Hi Peter,
I'm going to need to re-read this email as at first read I'm not exactly
sure what you are running into. If possible can you reduce it to 2
sentences of; "I expected this... but observe this...."
Ok, to clear things up, I expect if I remove rpm/RPMS/arm/kernel*.rpm
and everything in rpm/BUILD that "./ltib" will "do the right thing",
namely %prep, %build but not %clean the kernel if I have a package
enabled that selects PKG_KERNEL_LEAVESRC. Since PKG_*_LEAVESRC is a
transient config it fails when I try to build helloworld_mod.
Just to shed some light on the design, normally .config will override
defconfig, however if you touch defconfig ltib will notice this and use
the updated defconfig. The purpose of this is so that if you have an
autobuilder and check-in an update to defconfig, the autobuilder will use
the updated defconfig.
In this case I have not touched any of the config files...
Regarding "LEAVESRC" the idea is that this only needs to be transient as
once a package is left unpacked, it will never be removed and so on
subsequence builds the same sources remain there and just get re-built.
True, but being "paranoid" especially if I'm mucking with the config(s)
and package spec files, its easiest to force multiple package rebuilds
by deleting their resultant .rpm and rpm/BUILD directories and executing
"./ltib". Also my buildbot leaves its universe alone (i.e. all it does
is "svn update; ./ltib -m clean; ./ltib -b --preconfig
config/platform/<platform>/defconfig").
I'm sure I'm missing something - how can I tell LTIB to remove a
package's source (that's left around due to LEAVESRC) - if its exists in
rpm/BUILD, ltib cowardly refuses to remove it even if I update its .spec
file. So I added a "rm -rf rpm/BUILD/* to the buildbot steps and ended
up w/o kernel source and helloworld_mod failing.
Regards, Stuart
Stuart,
I've pulled LTIB from CVS on 20101216, and am using it for the basis of
OMAP work, and I'm runing into an issue.
I'm running into trouble due to the code in LTIB that clears out
PKG_*_LEAVESRC after a build completes.
The issue arises when I wanted to rebuild (from close to scratch) by
removing everything in rpm/BUILD, rpm/RPMS/arm, and rootfs, then execute
"./ltib" to rebuild the world . Unfortunately
config/platform/<platform>/.config takes precedence over the defconfig
and requires "./ltib -b --preconfig
config/platform/<platform>/defconfig" to make things work correctly
(this is due to the cod ein clear_transient_config clearing
PKG_KERNEL_LEAVESRC which gets stored in
config/platform/<platform>/.config and used by "./ltib" ib it exists).
I believe that PKG_KERNEL_LEAVESRC is overloaded as its used not only in
a one-shot case, but also to force the requirement of kernel source for
packages that need the kernel source.
I had solved this previously by creating a new PKG_<package>_NEEDSRC
variable is used in the ltib configuration select mechanisms(e.g):
config PKG_HELLOWORLD_MOD
depends CAP_HAS_MMU
select PKG_KERNEL_NEEDSRC
bool "hello world module example"
help
simple hello world kernel modules example
and then used either PKG_<package>_LEAVSRC or PKG_<package>_NEEDSRC to
force ltib to skip the %clean section:
if($leavesrc || $pcf->{$key . '_LEAVESRC'} || $pcf->{$key .
'_NEEDSRC'}) {
$rpmclean = '';
$ENV{$key . '_LEAVESRC'} = 'y';
} else {
$rpmclean = '--clean --rmsource ';
}
and left the code in clear_transient_configs alone along with the use of
PKG_KERNEL_LEAVESRC in config/platform/<platform>/main.lkc. I also
added the PKG_KERNEL_NEEDSRC rebuild key into $config_deps where LEVESRC
was used - is there a way to have LTIB automatically detect a change in
PKG_<package>_LEAVESRC/NEEDSRC and automatically force<package> to be
rebuilt? I ask partly since in the same project I had to go through
hoops to have openssl/wpa_supplicant source remain to build the wireless
driver for the wl127x wireless chip (for its encryption support).
Either my understanding of LTIB is off(no surprise there), and/or
PKG_<package>_LEAVSRC has subtle side effects. This drove me nuts until
I "fixed" it. Ican create a patch to the current LTIB CVS and send it
along...
--
Peter Barada
address@hidden
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ltib
--
Peter Barada
address@hidden