All of lore.kernel.org
 help / color / mirror / Atom feed
* wic appending ".1" to a file name on multiple images build
@ 2018-06-01 10:38 Alan Martinovic
  2018-06-01 10:52 ` Alexander Kanavin
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Martinovic @ 2018-06-01 10:38 UTC (permalink / raw)
  To: Yocto-mailing-list

Hi,
I'm creating two images with the single bitbake command and
on inherits the other (production, and a dev which "require production").

Building them at the same time causes an issue:

Traceback (most recent call lastd):
  File "/home/alan/workspace/senic-os-dev/oe/scripts/lib/wic/filemap.py",
line 120, in _open_image_file
     self._f_image = open(self._image_path, 'rb')
  FileNotFoundError: [Errno 2] No such file or directory:
'/home/alan/workspace/senic-os-dev/build/tmp-glibc/deploy/images/senic-hub/u-boot-sunxi-with-spl.bin.1'


The cause of the issue seems to be that `wic create`,
even though it gets the correct file path through the
wks file ("u-boot-sunxi-with-spl.bin")
somewhere in the execution of wic create that
fiile gets renamed (to "u-boot-sunxi-with-spl.bin.1")
and results in an above issue.

This only happens when the images are built in parallel,
running each separately gives no errors.

Am open for suggestions on how to approach this. :)


Be Well,
Alan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wic appending ".1" to a file name on multiple images build
  2018-06-01 10:38 wic appending ".1" to a file name on multiple images build Alan Martinovic
@ 2018-06-01 10:52 ` Alexander Kanavin
  2018-06-01 11:56   ` Alan Martinovic
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2018-06-01 10:52 UTC (permalink / raw)
  To: Alan Martinovic; +Cc: Yocto-mailing-list

2018-06-01 13:38 GMT+03:00 Alan Martinovic <alan.martinovic@senic.com>:
> Building them at the same time causes an issue:
>
> Traceback (most recent call lastd):
>   File "/home/alan/workspace/senic-os-dev/oe/scripts/lib/wic/filemap.py",
> line 120, in _open_image_file
>      self._f_image = open(self._image_path, 'rb')
>   FileNotFoundError: [Errno 2] No such file or directory:
> '/home/alan/workspace/senic-os-dev/build/tmp-glibc/deploy/images/senic-hub/u-boot-sunxi-with-spl.bin.1'
>
>
> The cause of the issue seems to be that `wic create`,
> even though it gets the correct file path through the
> wks file ("u-boot-sunxi-with-spl.bin")
> somewhere in the execution of wic create that
> fiile gets renamed (to "u-boot-sunxi-with-spl.bin.1")
> and results in an above issue.
>
> This only happens when the images are built in parallel,
> running each separately gives no errors.
>
> Am open for suggestions on how to approach this. :)

By applying code archaeology skills obviously, which are a must-have
for anyone involved in Yocto :)

Specifically here: where and how is self._image_path set? What are the
places in code that call into the path setter? Where do they get the
image name from? Does any of them manipulate the name and/or rename
the file and why?
Should the name include the image name to avoid such clashes and
races? And so on. :)

Alex


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wic appending ".1" to a file name on multiple images build
  2018-06-01 10:52 ` Alexander Kanavin
@ 2018-06-01 11:56   ` Alan Martinovic
  2018-06-01 12:00     ` Alexander Kanavin
  2018-06-02  3:04     ` Anuj Mittal
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Martinovic @ 2018-06-01 11:56 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Yocto-mailing-list

Yeah, a deep dive it is then. :)

Am just trying to print from the code using the Python debugger (as
used in the source file).
    self._log.debug("Print this")

but it's not printing anything even when running bitbake with -DDDvvv

On Fri, Jun 1, 2018 at 12:52 PM, Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
> 2018-06-01 13:38 GMT+03:00 Alan Martinovic <alan.martinovic@senic.com>:
>> Building them at the same time causes an issue:
>>
>> Traceback (most recent call lastd):
>>   File "/home/alan/workspace/senic-os-dev/oe/scripts/lib/wic/filemap.py",
>> line 120, in _open_image_file
>>      self._f_image = open(self._image_path, 'rb')
>>   FileNotFoundError: [Errno 2] No such file or directory:
>> '/home/alan/workspace/senic-os-dev/build/tmp-glibc/deploy/images/senic-hub/u-boot-sunxi-with-spl.bin.1'
>>
>>
>> The cause of the issue seems to be that `wic create`,
>> even though it gets the correct file path through the
>> wks file ("u-boot-sunxi-with-spl.bin")
>> somewhere in the execution of wic create that
>> fiile gets renamed (to "u-boot-sunxi-with-spl.bin.1")
>> and results in an above issue.
>>
>> This only happens when the images are built in parallel,
>> running each separately gives no errors.
>>
>> Am open for suggestions on how to approach this. :)
>
> By applying code archaeology skills obviously, which are a must-have
> for anyone involved in Yocto :)
>
> Specifically here: where and how is self._image_path set? What are the
> places in code that call into the path setter? Where do they get the
> image name from? Does any of them manipulate the name and/or rename
> the file and why?
> Should the name include the image name to avoid such clashes and
> races? And so on. :)
>
> Alex


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wic appending ".1" to a file name on multiple images build
  2018-06-01 11:56   ` Alan Martinovic
@ 2018-06-01 12:00     ` Alexander Kanavin
  2018-06-02  3:04     ` Anuj Mittal
  1 sibling, 0 replies; 5+ messages in thread
From: Alexander Kanavin @ 2018-06-01 12:00 UTC (permalink / raw)
  To: Alan Martinovic; +Cc: Yocto-mailing-list

It probably goes to some log file?

Alex

> On 1 Jun 2018, at 14.56, Alan Martinovic <alan.martinovic@senic.com> wrote:
> 
> Yeah, a deep dive it is then. :)
> 
> Am just trying to print from the code using the Python debugger (as
> used in the source file).
>    self._log.debug("Print this")
> 
> but it's not printing anything even when running bitbake with -DDDvvv
> 
> On Fri, Jun 1, 2018 at 12:52 PM, Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
>> 2018-06-01 13:38 GMT+03:00 Alan Martinovic <alan.martinovic@senic.com>:
>>> Building them at the same time causes an issue:
>>> 
>>> Traceback (most recent call lastd):
>>>  File "/home/alan/workspace/senic-os-dev/oe/scripts/lib/wic/filemap.py",
>>> line 120, in _open_image_file
>>>     self._f_image = open(self._image_path, 'rb')
>>>  FileNotFoundError: [Errno 2] No such file or directory:
>>> '/home/alan/workspace/senic-os-dev/build/tmp-glibc/deploy/images/senic-hub/u-boot-sunxi-with-spl.bin.1'
>>> 
>>> 
>>> The cause of the issue seems to be that `wic create`,
>>> even though it gets the correct file path through the
>>> wks file ("u-boot-sunxi-with-spl.bin")
>>> somewhere in the execution of wic create that
>>> fiile gets renamed (to "u-boot-sunxi-with-spl.bin.1")
>>> and results in an above issue.
>>> 
>>> This only happens when the images are built in parallel,
>>> running each separately gives no errors.
>>> 
>>> Am open for suggestions on how to approach this. :)
>> 
>> By applying code archaeology skills obviously, which are a must-have
>> for anyone involved in Yocto :)
>> 
>> Specifically here: where and how is self._image_path set? What are the
>> places in code that call into the path setter? Where do they get the
>> image name from? Does any of them manipulate the name and/or rename
>> the file and why?
>> Should the name include the image name to avoid such clashes and
>> races? And so on. :)
>> 
>> Alex


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: wic appending ".1" to a file name on multiple images build
  2018-06-01 11:56   ` Alan Martinovic
  2018-06-01 12:00     ` Alexander Kanavin
@ 2018-06-02  3:04     ` Anuj Mittal
  1 sibling, 0 replies; 5+ messages in thread
From: Anuj Mittal @ 2018-06-02  3:04 UTC (permalink / raw)
  To: Alan Martinovic, Alexander Kanavin; +Cc: Yocto-mailing-list

On 06/01/2018 07:56 PM, Alan Martinovic wrote:
> Yeah, a deep dive it is then. :)
> 
> Am just trying to print from the code using the Python debugger (as
> used in the source file).
>     self._log.debug("Print this")
> 
> but it's not printing anything even when running bitbake with -DDDvvv

wic create with -D should help you get started.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-06-02  3:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-01 10:38 wic appending ".1" to a file name on multiple images build Alan Martinovic
2018-06-01 10:52 ` Alexander Kanavin
2018-06-01 11:56   ` Alan Martinovic
2018-06-01 12:00     ` Alexander Kanavin
2018-06-02  3:04     ` Anuj Mittal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.