Paul, it's only for adding tasks to do deltask on. Not preventing current deltasks to be done.
Richard, I tried your suggestion but couldn't understand/judge the implications of changing -__deltask_regexp__ = re.compile(r"deltask\s+(?P<func>\w+)(?P<ignores>.*)") +__deltask_regexp__ = re.compile(r"deltask\s+(.+)") If you're fine with that change. Your solution works fine for my usecase, EXCEPT that +EXTRA_NOPACKAGE_DELTASKS = "" needs to be +EXTRA_NOPACKAGE_DELTASKS ?= "" right? Otherwise that variable would always be empty. Or would something like EXTRA_NOPACKAGE_DELTASKS_append(....) be used? /Fredrik ________________________________________ From: Paul Barker <pbar...@konsulko.com> Sent: Wednesday, July 1, 2020 12:22 PM To: Richard Purdie Cc: Fredrik Gustafsson; openembedded-core; tools-cfpbuild-internal; Fredrik Gustafsson Subject: Re: [OE-core] [PATCH v3] nopackages.bbclass: Get tasks from variable On Wed, 1 Jul 2020 at 11:12, Richard Purdie <richard.pur...@linuxfoundation.org> 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 > > > > <fredrik.gustafs...@axis.com> 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 <fredr...@axis.com> > > > > > --- > > > > > 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 (#140175): https://lists.openembedded.org/g/openembedded-core/message/140175 Mute This Topic: https://lists.openembedded.org/mt/75231136/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-