Problem with IMAGE_DEPENDS since "Switch to Recipe Specific Sysroots" in poky-master staging.bbclass

901 views
Skip to first unread message

Florian Wickert

unread,
Mar 20, 2017, 4:35:26 AM3/20/17
to swup...@googlegroups.com
Hi all,

I get bitbake errors since yocto poky's staging.bbclass switched to
recipe specific sysroots.
The error occurs in do_populate_sysroot: Function failed:
extend_recipe_sysroot, maybe because extend_recipe_sysroot is called
twice. Once at the beginning and once after do_swuimage.
This results in Exception: FileExistsError. The swu image is created
correctly, the error occurs after the do_swupdate task.
When I leave IMAGE_DEPENDS empty, everything is working.
I have not found a way to fix this until now.

Stefano Babic

unread,
Mar 20, 2017, 5:04:24 AM3/20/17
to Florian Wickert, swup...@googlegroups.com
So this happens with poky -master, but does it work with -morty ?

Regards,
Stefano

--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================

Florian Wickert

unread,
Mar 20, 2017, 5:13:36 AM3/20/17
to Stefano Babic, swup...@googlegroups.com
It does not happen with morty. The commit on master that introduced this
problem is this one:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/classes/staging.bbclass?id=9107d6ca144ac1f6169830dee25dae2dad775333
The function that causes the error (extend_recipe_sysroot) did not exist
before this commit.
Regards,
Florian

Stefano Babic

unread,
Mar 20, 2017, 6:57:35 AM3/20/17
to Florian Wickert, Stefano Babic, swup...@googlegroups.com
On 20/03/2017 10:12, Florian Wickert wrote:
> It does not happen with morty. The commit on master that introduced this
> problem is this one:
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/classes/staging.bbclass?id=9107d6ca144ac1f6169830dee25dae2dad775333
>
> The function that causes the error (extend_recipe_sysroot) did not exist
> before this commit.
> Regards,
> Florian

After do_swupdate my class calls do_createlink. What happens if you
drop the line from classes/swupdate.bbclass ?

Florian Wickert

unread,
Mar 20, 2017, 7:54:10 AM3/20/17
to Stefano Babic, swup...@googlegroups.com
The same error happens, unfortunately. It seems to be recipe
glibc-initial whose sysroot is populated twice.
This is the full error message:

ERROR: test-swu-image-1.0-r0 do_populate_sysroot: Error executing a
python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:extend_recipe_sysroot(d)
0003:
File:
'/home/florian/devel/test-os/build_a/../poky/meta/classes/staging.bbclass',
lineno: 623, function: extend_recipe_sysroot
0619: dest = newmanifest[l]
0620: if l.endswith("/"):
0621: staging_copydir(l, targetdir, dest,
seendirs)
0622: continue
*** 0623: staging_copyfile(l, targetdir, dest,
postinsts, seendirs)
0624:
0625: for f in fixme:
0626: if f == '':
0627: staging_processfixme(fixme[f], recipesysroot,
recipesysroot, recipesysrootnative, d)
File:
'/home/florian/devel/test-os/build_a/../poky/meta/classes/staging.bbclass',
lineno: 269, function: staging_copyfile
0265: os.symlink(linkto, dest)
0266: #bb.warn(c)
0267: else:
0268: try:
*** 0269: os.link(c, dest)
0270: except OSError as err:
0271: if err.errno == errno.EXDEV:
0272: bb.utils.copyfile(c, dest)
0273: else:
Exception: FileExistsError: [Errno 17] File exists:
'/home/florian/devel/test-os/build_a/tmp-glibc/sysroots-components/corei7-64/glibc-initial/usr/include/pthread.h'
->
'/home/florian/devel/test-os/build_a/tmp-glibc/work/a-oe-linux/test-swu-image/1.0-r0/recipe-sysroot/usr/include/pthread.h'

ERROR: test-swu-image-1.0-r0 do_populate_sysroot: Function failed:
extend_recipe_sysroot
ERROR: Logfile of failure stored in:
/home/florian/devel/test-os/build_a/tmp-glibc/work/a-oe-linux/test-swu-image/1.0-r0/temp/log.do_populate_sysroot.14673
ERROR: Task
(/home/florian/devel/test-os/build_a/../meta-javox/meta-test/recipes-extended/images/test-swu-image.bb:do_populate_sysroot)
failed with exit code '1'

Regards,
Florian

giz...@gmail.com

unread,
Apr 5, 2017, 9:22:00 AM4/5/17
to swupdate, sba...@denx.de, f...@javox-solutions.com

Any update on this? I see the same issue with another recipe that, similarly to swuimage does try to set dependencies on image artifacts...

Stefano Babic

unread,
Apr 5, 2017, 1:36:44 PM4/5/17
to giz...@gmail.com, swupdate, sba...@denx.de, f...@javox-solutions.com
I sent a patch, in my test the issue is solved, but Florian reported
that the issue is still present in his build - so I have not applied it
and the issue remains open.

Best regards,
Stefano Babic

giz...@gmail.com

unread,
Apr 5, 2017, 5:13:36 PM4/5/17
to swupdate, giz...@gmail.com, sba...@denx.de, f...@javox-solutions.com

I have been discussing this very similar issue today on #yocto IRC and Richard Purdie suggested to swap do_build for an earlier dependency e.g. do_image_complete in the dependency chain. Following his advice seems to be solve the problem on that other recipe. Setting do_populate_sysroot[noexec] = "1" was not enough to solve even there.

Florian Wickert

unread,
Apr 6, 2017, 10:00:34 AM4/6/17
to giz...@gmail.com, swupdate, sba...@denx.de
Changing the dependency to do_image_complete seems to work so far.
The error occurs randomly on my system, so its hard for me to say if
this is really a fix but I haven't seen the error today.

Stefano Babic

unread,
Apr 6, 2017, 10:42:52 AM4/6/17
to Florian Wickert, giz...@gmail.com, swupdate, sba...@denx.de
On 06/04/2017 15:59, Florian Wickert wrote:
> Changing the dependency to do_image_complete seems to work so far.
> The error occurs randomly on my system, so its hard for me to say if
> this is really a fix but I haven't seen the error today.
>

do_image_complete does not work if I add virtual/kernel IMAGE_DEPENDS,
that is if the kernel should be stored on a separate storage as rootfs.

Regards,
Stefano
Reply all
Reply to author
Forward
0 new messages