Skip to contentSkip to conversation

is it "addtask do_X ..." or "addtask X ..." or does it matter?

DISCUSSION Robert P. J. Day 2 participants 6 messages Jul 12, 2014 – Jul 15, 2014

lore
Share & tools
lore
#0 lore raw

want to clarify the two different ways to use addtask. for example:

classes/kernel.bbclass:addtask savedefconfig after do_configure classes/kernel.bbclass:addtask do_strip before do_sizecheck after do_kernel_link_vmlinux classes/kernel.bbclass:addtask sizecheck before do_install after do_strip

so what is the preferred form? are they equivalent?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw
Quoted 9 lines · Robert P. J. Day

want to clarify the two different ways to use addtask. for example:

classes/kernel.bbclass:addtask savedefconfig after do_configure classes/kernel.bbclass:addtask do_strip before do_sizecheck after do_kernel_link_vmlinux
classes/kernel.bbclass:addtask sizecheck before do_install after do_strip

so what is the preferred form? are they equivalent?

addtask do_strip will add a task named 'do_do_strip', afaik.

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#2 lore raw
Quoted 10 lines · Christopher Larson
Quoted 7 lines · Robert P. J. Day

want to clarify the two different ways to use addtask. for example:

classes/kernel.bbclass:addtask savedefconfig after do_configure classes/kernel.bbclass:addtask do_strip before do_sizecheck after do_kernel_link_vmlinux
classes/kernel.bbclass:addtask sizecheck before do_install after do_strip

Quoted 4 lines
Quoted 2 lines

so what is the preferred form? are they equivalent?

addtask do_strip will add a task named 'do_do_strip', afaik.

well, there is definitely some of that happening in the oe-core
codebase, feel free to:

  $ grep -r "addtask do_" *

so i'm not sure what to make of that.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#3 lore raw
In reply to Christopher Larson
Quoted 10 lines · Christopher Larson
Quoted 7 lines · Robert P. J. Day

want to clarify the two different ways to use addtask. for example:

classes/kernel.bbclass:addtask savedefconfig after do_configure classes/kernel.bbclass:addtask do_strip before do_sizecheck after do_kernel_link_vmlinux
classes/kernel.bbclass:addtask sizecheck before do_install after do_strip

Quoted 4 lines
Quoted 2 lines

so what is the preferred form? are they equivalent?

addtask do_strip will add a task named 'do_do_strip', afaik.

so is there a final opinion on the validity of doing

addtask do_X ...

rather than

addtask X ...

if what chris writes is accurate, there are some broken class and recipe files in oe-core:

classes/kernel.bbclass:addtask do_strip before do_sizecheck after do_kernel_link_vmlinux classes/staging.bbclass:addtask do_populate_sysroot_setscene
classes/insane.bbclass:addtask do_package_qa after do_packagedata do_package before do_build classes/insane.bbclass:addtask do_package_qa_setscene
classes/package_rpm.bbclass:addtask do_package_write_rpm_setscene
classes/license.bbclass:addtask do_populate_lic_setscene
classes/archiver.bbclass:addtask do_ar_original after do_unpack
classes/archiver.bbclass:addtask do_unpack_and_patch after do_patch
classes/archiver.bbclass:addtask do_ar_patched after do_unpack_and_patch classes/archiver.bbclass:addtask do_ar_configured after do_unpack_and_patch classes/archiver.bbclass:addtask do_dumpdata
classes/archiver.bbclass:addtask do_ar_recipe
classes/archiver.bbclass:addtask do_deploy_archives before do_build
classes/deploy.bbclass:addtask do_deploy_setscene
classes/package_deb.bbclass:addtask do_package_write_deb_setscene
classes/package.bbclass:addtask do_package_setscene
classes/package.bbclass:addtask do_packagedata_setscene
classes/package_ipk.bbclass:addtask do_package_write_ipk_setscene recipes-core/eglibc/eglibc-package.inc:addtask do_install_locale after do_install before do_populate_sysroot do_package recipes-core/base-passwd/base-passwd_3.5.29.bb:addtask do_package after do_populate_sysroot recipes-core/meta/package-index.bb:addtask do_package_index before do_build recipes-devtools/gcc/gcc-configure-common.inc:addtask do_preconfigure after do_patch before do_configure recipes-support/boost/boost.inc:addtask do_boostconfig after do_patch before do_configure

surely all of the above can't be broken, can they?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#4 lore raw
Quoted 34 lines · Robert P. J. Day

if what chris writes is accurate, there are some broken class and recipe files in oe-core:

classes/kernel.bbclass:addtask do_strip before do_sizecheck after do_kernel_link_vmlinux
classes/staging.bbclass:addtask do_populate_sysroot_setscene classes/insane.bbclass:addtask do_package_qa after do_packagedata do_package before do_build
classes/insane.bbclass:addtask do_package_qa_setscene classes/package_rpm.bbclass:addtask do_package_write_rpm_setscene classes/license.bbclass:addtask do_populate_lic_setscene classes/archiver.bbclass:addtask do_ar_original after do_unpack classes/archiver.bbclass:addtask do_unpack_and_patch after do_patch classes/archiver.bbclass:addtask do_ar_patched after do_unpack_and_patch classes/archiver.bbclass:addtask do_ar_configured after do_unpack_and_patch classes/archiver.bbclass:addtask do_dumpdata classes/archiver.bbclass:addtask do_ar_recipe classes/archiver.bbclass:addtask do_deploy_archives before do_build classes/deploy.bbclass:addtask do_deploy_setscene classes/package_deb.bbclass:addtask do_package_write_deb_setscene classes/package.bbclass:addtask do_package_setscene classes/package.bbclass:addtask do_packagedata_setscene classes/package_ipk.bbclass:addtask do_package_write_ipk_setscene recipes-core/eglibc/eglibc-package.inc:addtask do_install_locale after do_install before do_populate_sysroot do_package recipes-core/base-passwd/base-passwd_3.5.29.bb:addtask do_package after do_populate_sysroot
recipes-core/meta/package-index.bb:addtask do_package_index before do_build
recipes-devtools/gcc/gcc-configure-common.inc:addtask do_preconfigure after do_patch before do_configure recipes-support/boost/boost.inc:addtask do_boostconfig after do_patch before do_configure

Quoted 2 lines

surely all of the above can't be broken, can they?

I stand corrected, looks like code in bb.build.addtask automatically adds do_ if it isn't present. We probably should pick one and fix the metadata to be consistent, however :)

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#5 lore raw
Quoted 37 lines · Christopher Larson
Quoted 34 lines · Robert P. J. Day

if what chris writes is accurate, there are some broken class and recipe files in oe-core:

classes/kernel.bbclass:addtask do_strip before do_sizecheck after do_kernel_link_vmlinux
classes/staging.bbclass:addtask do_populate_sysroot_setscene classes/insane.bbclass:addtask do_package_qa after do_packagedata do_package before do_build
classes/insane.bbclass:addtask do_package_qa_setscene classes/package_rpm.bbclass:addtask do_package_write_rpm_setscene classes/license.bbclass:addtask do_populate_lic_setscene classes/archiver.bbclass:addtask do_ar_original after do_unpack classes/archiver.bbclass:addtask do_unpack_and_patch after do_patch classes/archiver.bbclass:addtask do_ar_patched after do_unpack_and_patch classes/archiver.bbclass:addtask do_ar_configured after do_unpack_and_patch classes/archiver.bbclass:addtask do_dumpdata classes/archiver.bbclass:addtask do_ar_recipe classes/archiver.bbclass:addtask do_deploy_archives before do_build classes/deploy.bbclass:addtask do_deploy_setscene classes/package_deb.bbclass:addtask do_package_write_deb_setscene classes/package.bbclass:addtask do_package_setscene classes/package.bbclass:addtask do_packagedata_setscene classes/package_ipk.bbclass:addtask do_package_write_ipk_setscene recipes-core/eglibc/eglibc-package.inc:addtask do_install_locale after do_install before do_populate_sysroot do_package recipes-core/base-passwd/base-passwd_3.5.29.bb:addtask do_package after do_populate_sysroot
recipes-core/meta/package-index.bb:addtask do_package_index before do_build
recipes-devtools/gcc/gcc-configure-common.inc:addtask do_preconfigure after do_patch before do_configure recipes-support/boost/boost.inc:addtask do_boostconfig after do_patch before do_configure

Quoted 6 lines
Quoted 2 lines

surely all of the above can't be broken, can they?

I stand corrected, looks like code in bb.build.addtask automatically adds do_ if it isn't present. We probably should pick one and fix the metadata to be consistent, however :)

ah, yes, there it is:

def addtask(task, before, after, d):

    if task[:3] != "do_":
        task = "do_" + task

that just invites abuse, doesn't it? :-)

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================