[OE-core] [PATCH] image_types: Ensure /init exists for cpio rootfs archives

Darren Hart dvhart at linux.intel.com
Thu Jan 5 23:36:11 UTC 2012



On 01/05/2012 04:30 AM, Richard Purdie wrote:
> On Thu, 2012-01-05 at 01:05 +0100, Andrea Adami wrote:
>> I'd say we have to test for the in-existence of the file instead of
>> blindly touching it.
>> Smthg like
>>
>> if [! -e ${IMAGE_ROOTFS}/init]; then
>> touch ${IMAGE_ROOTFS}/init
>> fi

Why? Touch creates it if it doesn't exist and updates the modtime if it
does. It doesn't modify the content of the file if it exists. What is
the motivation for testing for it's existence?

>>
>>
>> Now, repeating that block for all 4 cpio images is a bit ugly... better ideas?
> 
> Make it a shell function we call? I'd also check for
> ${base_sbindir}/init first too?

Why check for that? So we can link to it instead of creating an empty file?


--
Darren

> 
> Cheers,
> 
> Richard
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel




More information about the Openembedded-core mailing list