On 12/5/19 8:31 PM, Jan Kiszka wrote:
> On 05.12.19 20:17, Vijai Kumar K wrote:
>> On Thu, Dec 05, 2019 at 07:04:07PM +0100, Jan Kiszka wrote:
>>> On 05.12.19 18:44, vijaikumar.kanagarajan@gmail.com wrote:
>>>> From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
>>>>
>>>> Sometimes during packaging tar prints a warning "file changed as we read it"
>>>> and exits with return code 1. This is observed when we generete both
>>>> wic-img and targz-img together. Ignore the error.
>>>
>>> Ignoring errors is rarely a good idea. In this case, it tells you that
>>> you have a bug in your layer that missing a dependency. I know this
>>> because we once had the same issue in a product layer. So: NAK
>>>
>>> Jan
>>
>> Ah! Ok. Back to square one I guess. Its currently observed in our downstream setups
>> only. I have no good reason to justify it. Reproducing this issue is gonna be difficult.
>> Let me see if I can monitor file changes and pinpoint the exact condition.
>> But this is going to take a while.
>>
>> If it helps, the scenario is IMAGE_TYPE set to wic-img and targz-img is
>> inherited so both are executed for a build. Also, on a seperate note
>
> wic may have found a reason to modify the rootfs while integrating it.
> So a first shot could be making targz depend on wic completion.
>
> BTW, this sounds similar to
> https://gitlab.com/cip-project/cip-core/isar-cip-core/blob/next/classes/wic-targz-img.bbclass
> - and that class may have the same issue...
>
In case of this class the wic is create first and tarball afterwards.
From my expirence I never had the tarball creation failing during the
cip or xenomai-builds which both use the targz class. Does the error
during a clean build from scratch or only during a partial rebuild?
>> IMAGE_TYPE's functionality could be extended to provide multiple image types.
>> I believe we could specify only one right now. Former is more clean and particularly
>> useful if one wants a wic for sd boot and tar for nfsroot. Planning to take this up
>> next.
>
> Right, that is of general interest, indeed. Quirin has something planned
> around the same use case as well.
>
> Jan
>
Quirin