All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Fredrik Gustafsson" <fredrik.gustafsson@axis.com>
To: Paul Barker <pbarker@konsulko.com>,
	Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>,
	tools-cfpbuild-internal <tools-cfpbuild-internal@axis.com>
Subject: Re: [OE-core] [PATCH v3] nopackages.bbclass: Get tasks from variable
Date: Wed, 1 Jul 2020 10:51:24 +0000	[thread overview]
Message-ID: <1593600684100.43870@axis.com> (raw)
In-Reply-To: <CAM9ZRVvkcyYMxXEjZqjVBd=X-s7v_2YrY+GeJHgh3XhML0_Wng@mail.gmail.com>

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 <pbarker@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.purdie@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.gustafsson@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 <fredrigu@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

  reply	other threads:[~2020-07-01 10:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01  8:46 Add package managers as a plugin Fredrik Gustafsson
2020-07-01  8:46 ` [PATCH v3] nopackages.bbclass: Get tasks from variable Fredrik Gustafsson
2020-07-01  9:48   ` [OE-core] " Paul Barker
2020-07-01  9:54     ` Richard Purdie
     [not found]     ` <161D98456D41D2FE.27211@lists.openembedded.org>
2020-07-01 10:11       ` Richard Purdie
     [not found]       ` <161D992D91B5C0EE.29179@lists.openembedded.org>
2020-07-01 10:12         ` Richard Purdie
2020-07-01 10:22           ` Paul Barker
2020-07-01 10:51             ` Fredrik Gustafsson [this message]
2020-07-09 10:41   ` Fredrik Gustafsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1593600684100.43870@axis.com \
    --to=fredrik.gustafsson@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=pbarker@konsulko.com \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=tools-cfpbuild-internal@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.