[yocto] busybox: adding task to run before do_configure

Måns Zigher mans.zigher at gmail.com
Tue Jun 26 02:28:01 PDT 2018


Hi,

Thanks for your answer. So this is a simplified implementation so you are
right. I have based my implementation on a class used for kernel you can
find the original implementation here
https://github.com/resin-os/meta-resin/blob/master/meta-resin-common/classes/kernel-resin.bbclass.
I am not sure I understand it fully but the error is not reproducible
there. You can modify the config in two ways you can define areas to modify
in the config but you can also define a new config to base it on and I
thought that the deptasks was need to make sure that configured is called
again. But maybe you are right there is no reason for it. But I am
still curious how it can affect the staging part of install task since it
is not affecting the kernel and I am not doing anything in the tasks.

BR
Mans Zigher

2018-06-25 20:03 GMT+02:00 Burton, Ross <ross.burton at intel.com>:

> AFAIK, you don't need the deptasks as the before/after statements will
> insert the task in the right place.
>
> Ross
>
> On 25 June 2018 at 18:59, Måns Zigher <mans.zigher at gmail.com> wrote:
> > Hi,
> >
> > I have created this simple class file
> >
> > python do_busybox_foo() {
> >     bb.warn("BUSYBOX: foo task!")
> > }
> > addtask busybox_foo after do_configure before do_compile
> > do_busybox_foo[deptask] += "do_configure"
> >
> > do_compile[deptask] += "do_busybox_foo"
> >
> > And created a busybox_%.bbappend inherit this class. When running this I
> am
> > seeing the following error
> >
> > WARNING: busybox-1.24.1-r0 do_busybox_foo: BUSYBOX: foo task!
> > ERROR: busybox-1.24.1-r0 do_install: 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/user/workdir/layers/poky/meta/classes/staging.bbclass',
> lineno:
> > 565, function: extend_recipe_sysroot
> >      0561:                    dest = newmanifest[l]
> >      0562:                    if l.endswith("/"):
> >      0563:                        staging_copydir(l, targetdir, dest,
> > seendirs)
> >      0564:                        continue
> >  *** 0565:                    staging_copyfile(l, targetdir, dest,
> > postinsts, seendirs)
> >      0566:
> >      0567:    bb.note("Installed into sysroot: %s" % str(msg_adding))
> >      0568:    bb.note("Skipping as already exists in sysroot: %s" %
> > str(msg_exists))
> >      0569:
> > File: '/home/user/workdir/layers/poky/meta/classes/staging.bbclass',
> lineno:
> > 151, function: staging_copyfile
> >      0147:        os.symlink(linkto, dest)
> >      0148:        #bb.warn(c)
> >      0149:    else:
> >      0150:        try:
> >  *** 0151:            os.link(c, dest)
> >      0152:        except OSError as err:
> >      0153:            if err.errno == errno.EXDEV:
> >      0154:                bb.utils.copyfile(c, dest)
> >      0155:            else:
> > Exception: FileExistsError: [Errno 17] File exists:
> > '/home/user/workdir/build/tmp/sysroots-components/
> cortexa7hf-neon/glibc-initial/usr/include/time.h'
> > ->
> > '/home/user/workdir/build/tmp/work/cortexa7hf-neon-target-
> linux-gnueabi/busybox/1.24.1-r0/recipe-sysroot/usr/include/time.h'
> >
> > ERROR: busybox-1.24.1-r0 do_install: Function failed:
> extend_recipe_sysroot
> > ERROR: Logfile of failure stored in:
> > /home/user/workdir/build/tmp/work/cortexa7hf-neon-target-
> linux-gnueabi/busybox/1.24.1-r0/temp/log.do_install.30635
> > ERROR: Task
> > (/home/user/workdir/layers/poky/meta/recipes-core/
> busybox/busybox_1.24.1.bb:do_install)
> > failed with exit code '1'
> >
> > I have tried to debug this because I cannot understand why it affects the
> > staging in the install task. By removing the do_busybox_foo[deptask] I
> > prevent this error. Any advise would be appreciated.
> >
> > BR
> > Måns Zigher
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto at yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180626/57c1cada/attachment-0001.html>


More information about the yocto mailing list