All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>,
	 "openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [RFC PATCH 10/14] package_ipk/deb/rpm: Drop recursive do_build task dependencies
Date: Thu, 23 Sep 2021 21:50:37 -0700	[thread overview]
Message-ID: <CAMKF1sqeyw09suOzauHvqhMfieBedsKa-JH5Qe5H+M8R0cCbgg@mail.gmail.com> (raw)
In-Reply-To: <c6c0603017b848fea5650c2a2273e66b@axis.com>

On Thu, Sep 23, 2021 at 2:42 PM Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
>
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-
> > core@lists.openembedded.org> On Behalf Of Richard Purdie
> > Sent: den 20 september 2021 14:46
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [RFC PATCH 10/14] package_ipk/deb/rpm: Drop recursive
> > do_build task dependencies
> >
> > This is a controversial change which removes the recursive dependencies
> > from the do_build target of packaging tasks of recipes.
> >
> > Currently this means when you "bitbake <image>" or "bitbake <recipe>",
> > the packaging tasks run for all packaging backends enabled for all recipes
> > in the dependency chain. The same therefore then applies to images.
> >
> > We don't actually need that, it is a convinience thing. Removing it
> > massively simplifies the task graph and causes much fewer tasks to execute
> > in many common scenarios. It also means less sstate is fetched for
> > example when building an image.
> >
> > This means when building a recipe all package formats would be built
> > but when building an image, only the format used by the image would be
> > generated. This should be an improvement in most cases but some CI systems
> > may need to be explict about what they're building.
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> >  meta/classes/package_deb.bbclass | 5 +----
> >  meta/classes/package_ipk.bbclass | 4 +---
> >  meta/classes/package_rpm.bbclass | 4 +---
> >  3 files changed, 3 insertions(+), 10 deletions(-)
> >
> > diff --git a/meta/classes/package_deb.bbclass
> > b/meta/classes/package_deb.bbclass
> > index eca43e17876..77caaa55c8f 100644
> > --- a/meta/classes/package_deb.bbclass
> > +++ b/meta/classes/package_deb.bbclass
> > @@ -315,10 +315,7 @@ python do_package_write_deb () {
> >  do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}"
> >  do_package_write_deb[cleandirs] = "${PKGWRITEDIRDEB}"
> >  do_package_write_deb[depends] +=
> > "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'),
> > 'do_populate_sysroot')}"
> > -addtask package_write_deb after do_packagedata do_package
> > -
> > +addtask package_write_deb after do_packagedata do_package before do_build
> >
> >  PACKAGEINDEXDEPS += "dpkg-native:do_populate_sysroot"
> >  PACKAGEINDEXDEPS += "apt-native:do_populate_sysroot"
> > -
> > -do_build[recrdeptask] += "do_package_write_deb"
> > diff --git a/meta/classes/package_ipk.bbclass
> > b/meta/classes/package_ipk.bbclass
> > index c3b53854e8b..998e18ba6c1 100644
> > --- a/meta/classes/package_ipk.bbclass
> > +++ b/meta/classes/package_ipk.bbclass
> > @@ -274,9 +274,7 @@ python do_package_write_ipk () {
> >  do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}"
> >  do_package_write_ipk[cleandirs] = "${PKGWRITEDIRIPK}"
> >  do_package_write_ipk[depends] +=
> > "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'),
> > 'do_populate_sysroot')}"
> > -addtask package_write_ipk after do_packagedata do_package
> > +addtask package_write_ipk after do_packagedata do_package before do_build
> >
> >  PACKAGEINDEXDEPS += "opkg-utils-native:do_populate_sysroot"
> >  PACKAGEINDEXDEPS += "opkg-native:do_populate_sysroot"
> > -
> > -do_build[recrdeptask] += "do_package_write_ipk"
> > diff --git a/meta/classes/package_rpm.bbclass
> > b/meta/classes/package_rpm.bbclass
> > index 88d861c0e75..60f8299d965 100644
> > --- a/meta/classes/package_rpm.bbclass
> > +++ b/meta/classes/package_rpm.bbclass
> > @@ -748,9 +748,7 @@ python do_package_write_rpm () {
> >  do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}"
> >  do_package_write_rpm[cleandirs] = "${PKGWRITEDIRRPM}"
> >  do_package_write_rpm[depends] +=
> > "${@oe.utils.build_depends_string(d.getVar('PACKAGE_WRITE_DEPS'),
> > 'do_populate_sysroot')}"
> > -addtask package_write_rpm after do_packagedata do_package
> > +addtask package_write_rpm after do_packagedata do_package before do_build
> >
> >  PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
> >  PACKAGEINDEXDEPS += "createrepo-c-native:do_populate_sysroot"
> > -
> > -do_build[recrdeptask] += "do_package_write_rpm"
> > --
> > 2.32.0
>
> I just wanted to give some positive feedback now that this has been
> integrated. This patch alone reduced the number of edges in the task
> graph by 50% for one of our typical products (from 127721 to 64785).
> That is pretty impressive!
>
> And to add to this, the later patch that removes the use of the meta
> class reduced the number of nodes in the task graph by 10% (from 17122
> to 15313). Also pretty impressive for such a small change.
>

this is quite encouraging, dont go by number of lines of change :)
btw. did you also try with other change which reduces native dependencies,

> //Peter
>
> 
>

  parent reply	other threads:[~2021-09-24  4:51 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20 12:46 [PATCH 01/14] vim: Backport fix for CVE-2021-3770 Richard Purdie
2021-09-20 12:46 ` [PATCH 02/14] libgcrypt: Upgrade 1.9.3 -> 1.9.4 Richard Purdie
2021-09-20 12:46 ` [PATCH 03/14] sqlite3: Exclude CVE-2021-36690 from cve checks Richard Purdie
2021-09-20 12:46 ` [PATCH 04/14] recipes: Add missing pkgconfig inherit Richard Purdie
2021-09-20 12:46 ` [PATCH 05/14] lttng-tools: Add missing DEPENDS on bison-native Richard Purdie
2022-01-18 20:48   ` [OE-core] " Denys Dmytriyenko
2021-09-20 12:46 ` [PATCH 06/14] image/qemu: Add explict depends for qemu-helper addto_recipe_sysroot task Richard Purdie
2021-09-20 12:46 ` [PATCH 07/14] staging: Mark deploy an sstate task Richard Purdie
2021-09-20 12:46 ` [PATCH 08/14] sstate: Ensure deploy tasks don't pull in toolchains Richard Purdie
2021-09-20 12:46 ` [PATCH 09/14] sstate: Avoid deploy_source_date_epoch sstate when unneeded Richard Purdie
2021-09-20 12:46 ` [RFC PATCH 10/14] package_ipk/deb/rpm: Drop recursive do_build task dependencies Richard Purdie
2021-09-23 21:41   ` [OE-core] " Peter Kjellerstedt
2021-09-23 21:58     ` Richard Purdie
2021-09-24  4:50     ` Khem Raj [this message]
2021-09-24  7:58       ` Martin Jansa
2021-09-24  8:30         ` Richard Purdie
2021-09-24 17:20         ` Khem Raj
2021-09-20 12:46 ` [RFC PATCH 11/14] populate_sdk_base/images: Drop use of 'meta' class and hence do_build dependencies Richard Purdie
2021-10-27  2:43   ` [OE-core] " ChenQi
2021-11-02 13:06     ` Richard Purdie
2021-09-20 12:46 ` [PATCH 12/14] buildtools-tarball/uninative-tarball/meta-ide-support: Drop useless meta class Richard Purdie
2021-09-20 12:46 ` [PATCH 13/14] meta: Drop useless class Richard Purdie
2021-09-20 12:46 ` [RFC PATCH 14/14] layer.conf: Extend recipes not to install without explict dependencies Richard Purdie
     [not found] ` <16A68880435BB472.28512@lists.openembedded.org>
2021-09-20 12:48   ` [OE-core] " Richard Purdie
2021-09-20 13:34     ` Joshua Watt
2021-09-21  4:21       ` Khem Raj
2021-10-01 14:17         ` Martin Jansa
2021-10-17 23:50           ` Andreas Müller
2021-10-18 14:12             ` Martin Jansa
2021-10-18 14:29               ` Richard Purdie
2021-10-18 16:50               ` Andreas Müller
2021-10-18 16:59               ` Andreas Müller
2021-10-18 19:07                 ` Konrad Weihmann
2021-10-18 21:08                   ` Richard Purdie
     [not found] ` <16A6887F33E2E04C.31899@lists.openembedded.org>
2021-09-20 12:51   ` [OE-core] [RFC PATCH 11/14] populate_sdk_base/images: Drop use of 'meta' class and hence do_build dependencies Richard Purdie
2021-09-20 16:32     ` Khem Raj
2021-09-20 20:02       ` Richard Purdie

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=CAMKF1sqeyw09suOzauHvqhMfieBedsKa-JH5Qe5H+M8R0cCbgg@mail.gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.kjellerstedt@axis.com \
    --cc=richard.purdie@linuxfoundation.org \
    /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.