[OE-core] [PATCH 0/5 V2] refactor the archiver*.bbclass

Burton, Ross ross.burton at intel.com
Thu Feb 27 13:05:06 UTC 2014


Hi Robert,

Having a look at this and playing with my own toy archiver makes me
think that this shouldn't be using the postfuncs at all.

The main task, deploy_archives, should depend on the subtasks that it
needs and be simply ordered before do_build.  I see that your code
does this but changes it to be before do_rootfs if the recipe is an
image: I'm not sure I understand why this is as do_rootfs is just a
task that executes before do_build so this shouldn't need
special-casing.

Why did you implement the subtasks as postfuncs instead of normal
tasks?  This has the effect of causing more work to be done if the
archiver needs to run: for example do_ar_unpacked() is a postfunc on
do_unpack so either enabling/disabling the archiver or editing the
archiver class causes the do_unpack hash to change, so everything
afterwards (do_patch, do_configure, do_compile, ...) has to
re-execute.

My toy archiver was implemented as a new task which is after do_fetch
but before do_build.  This means that it executes after fetch has
completed but is outside of the
fetch->patch->configure->compile->install sequence.

https://github.com/rossburton/meta-ross/blob/master/classes/rearchiver.bbclass

(it also has a way of archiving the original sources in a way that
actually archives the original sources)

Ross



More information about the Openembedded-core mailing list