On Wed, 1 Jul 2020 at 11:12, Richard Purdie <[email protected]> wrote: > > On Wed, 2020-07-01 at 11:11 +0100, Richard Purdie via > lists.openembedded.org wrote: > > On Wed, 2020-07-01 at 10:54 +0100, Richard Purdie via > > lists.openembedded.org wrote: > > > On Wed, 2020-07-01 at 10:48 +0100, Paul Barker wrote: > > > > On Wed, 1 Jul 2020 at 09:46, Fredrik Gustafsson > > > > <[email protected]> wrote: > > > > > Get tasks from a variable instead of having them hardcoded. > > > > > This > > > > > will > > > > > enable other layers to add tasks that should be deleted when > > > > > nopackages > > > > > is used. > > > > > > > > > > Signed-off-by: Fredrik Gustafsson <[email protected]> > > > > > --- > > > > > meta/classes/nopackages.bbclass | 19 +++++++------------ > > > > > 1 file changed, 7 insertions(+), 12 deletions(-) > > > > > > > > > > diff --git a/meta/classes/nopackages.bbclass > > > > > b/meta/classes/nopackages.bbclass > > > > > index 559f5078bd..4c9fe510c5 100644 > > > > > --- a/meta/classes/nopackages.bbclass > > > > > +++ b/meta/classes/nopackages.bbclass > > > > > @@ -1,12 +1,7 @@ > > > > > -deltask do_package > > > > > -deltask do_package_write_rpm > > > > > -deltask do_package_write_ipk > > > > > -deltask do_package_write_deb > > > > > -deltask do_package_qa > > > > > -deltask do_packagedata > > > > > -deltask do_package_setscene > > > > > -deltask do_package_write_rpm_setscene > > > > > -deltask do_package_write_ipk_setscene > > > > > -deltask do_package_write_deb_setscene > > > > > -deltask do_package_qa_setscene > > > > > -deltask do_packagedata_setscene > > > > > +NO_PACKAGES_DELTASKS += "do_package do_package_write_rpm > > > > > do_package_write_ipk do_package_write_deb do_package_qa > > > > > do_packagedata do_package_setscene > > > > > do_package_write_rpm_setscene > > > > > do_package_write_ipk_setscene do_package_write_deb_setscene > > > > > do_package_qa_setscene do_packagedata_setscene" > > > > > > > > Not sure if `+=` was present in the previous versions, I only > > > > just > > > > noticed it now. I think `?=` is a better choice so it can be > > > > overridden easily. Other than that, this looks good. > > > > > > > > > + > > > > > +python () { > > > > > + list = d.getVar("NO_PACKAGES_DELTASKS").split() > > > > > + for task in list: > > > > > + bb.build.deltask(task, d) > > > > > +} > > > > > > I'm just sad this is having to use anonymous python. Its slow and > > > I'd > > > like to see less of it, not more, given people's complaints about > > > parsing speed. > > > > > > I did make a suggestion about how this could be done but that isn't > > > an option. I might sort out such a patch. > > > > http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t222&id=46a01aef15b19431bd9f2924537723481e0151e5 > > > > is a patch which lets deltask become a bit more flexible. I've not > > tested it much but see it if works/helps. > > Sorry: > http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t222&id=fd24e59fc886e6642bc3c8fb2941a37a1cc4042a > > Cheers, > > Richard (in need of caffeine)
I like this approach. Fredrik, what's the reason for using a variable here again? Is it just to be able to add tasks to the list or do you also need the ability to remove tasks from the list? Thanks, -- Paul Barker Konsulko Group
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#140173): https://lists.openembedded.org/g/openembedded-core/message/140173 Mute This Topic: https://lists.openembedded.org/mt/75231136/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
