openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Kanavin <alex.kanavin@gmail.com>
To: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: "Yu, Mingli" <mingli.yu@eng.windriver.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] qemu: Split the qemu package
Date: Tue, 30 May 2023 16:33:02 +0200	[thread overview]
Message-ID: <CANNYZj9xxEnyxEyWv9q4AY9Cj_zpw6fSyqc6uwLOwzkFYFnZvw@mail.gmail.com> (raw)
In-Reply-To: <CADkTA4MLkWsaiLWJoj_7A+2uc4TP13Zyp=JASyZnraNZqrTwsA@mail.gmail.com>

I might be missing something here, but can the free-form, anonymous
python code block be avoided? Don't we have PACKAGES_DYNAMIC for this
purpose?

Alex

On Tue, 30 May 2023 at 15:51, Bruce Ashfield <bruce.ashfield@gmail.com> wrote:
>
> On Tue, May 30, 2023 at 9:17 AM Yu, Mingli <mingli.yu@eng.windriver.com> wrote:
> >
> > From: Mingli Yu <mingli.yu@windriver.com>
> >
> > Currently all files packaged into one package such as qemu-7.2.0-*.rpm.
> > After the qemu package installed on the target, it will take up 464M
> > which includes not only the one matches the arch of the target but aslo
> > all available built qemu targets which set by QEMU_TARGETS.
> >
> > Split the qemu package into qemu-7.2.0-*.rpm, qemu-aarch64-7.2.0*.rpm,
> > qemu-arm-7.2.0*.rpm, qemu-x86_64-7.2.0*.rpm and etc. And let user can only
> > choose the corresponding qemu arch package they want to install should ease
> > the concerns who cares much about the size in embedded device as it
> > decreases the qemu rpm(qemu-7.2.0*.rpm) size from about 65M to about 17M
> > and the size of the extracted qemu RPM decreased from about 464M to about
> > 248M.
>
> I've been splitting the qemu packages in meta-virtualization for years now.
>
> I find the python more difficult to read than just using overrides, as
> it is much more explicit.
>
> Is there a reason why that approach didn't work in this scenario ?
>
> As Richard mentioned, you should also pull in all the subpackages by
> default with the main qemu package, to avoid regressions.
>
> Also, in the experience of meta-virt, you only want this splitting on
> target builds, not native/host.
>
> Bruce
>
> >
> > Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> > ---
> >  meta/recipes-devtools/qemu/qemu.inc | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> >
> > diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
> > index a87dee5c99..7302d63747 100644
> > --- a/meta/recipes-devtools/qemu/qemu.inc
> > +++ b/meta/recipes-devtools/qemu/qemu.inc
> > @@ -230,6 +230,25 @@ INSANE_SKIP:${PN} = "arch"
> >
> >  FILES:${PN} += "${datadir}/icons"
> >
> > +python(){
> > +    allarchs = d.getVar('QEMU_TARGETS').split()
> > +    packages = d.getVar('PACKAGES').split()
> > +    pn = d.getVar('PN')
> > +
> > +    newpackages=[]
> > +    for arch in allarchs:
> > +        archpackage = 'qemu-' + arch
> > +        if archpackage not in packages:
> > +            newpackages.append(archpackage)
> > +        d.setVar('FILES:' + pn + "-" + arch, '${bindir}/qemu-' + arch)
> > +        d.appendVar('FILES:' + pn + "-" + arch, ' ' + '${bindir}/qemu-system-' + arch)
> > +        if arch == "mips":
> > +            d.appendVar('RDEPENDS:' + pn + '-' + arch, ' ' + 'bash')
> > +    packages = newpackages + packages
> > +    d.setVar('PACKAGES', ' '.join(packages))
> > +}
> > +
> > +
> >  # Put the guest agent in a separate package
> >  PACKAGES =+ "${PN}-guest-agent"
> >  SUMMARY:${PN}-guest-agent = "QEMU guest agent"
> > --
> > 2.25.1
> >
> >
> >
> >
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#181924): https://lists.openembedded.org/g/openembedded-core/message/181924
> Mute This Topic: https://lists.openembedded.org/mt/99219254/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


  reply	other threads:[~2023-05-30 14:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 13:17 [PATCH] qemu: Split the qemu package mingli.yu
2023-05-30 13:30 ` [OE-core] " Richard Purdie
2023-05-30 13:51 ` Bruce Ashfield
2023-05-30 14:33   ` Alexander Kanavin [this message]
2023-05-30 14:54     ` Richard Purdie
2023-05-30 15:09       ` Bruce Ashfield
2023-06-01  9:33         ` Yu, Mingli
2023-06-01 13:31           ` Bruce Ashfield
2023-06-01  9:28       ` [PATCH v2] " mingli.yu
2023-06-01 13:32         ` [OE-core] " Bruce Ashfield
2023-06-02  2:36           ` [PATCH v3] " mingli.yu
2023-06-02 13:08             ` [OE-core] " Bruce Ashfield
2023-06-02 13:19               ` Richard Purdie
2023-06-07  3:09                 ` Yu, Mingli
2023-06-07  8:33                   ` Richard Purdie
2023-06-07  9:08                     ` [PATCH v4] " mingli.yu
2023-06-07 20:53                       ` [OE-core] " Alexandre Belloni
2023-06-08  5:45                         ` [PATCH v5] " mingli.yu
2023-06-08 13:33                           ` [OE-core] " Bruce Ashfield
2023-06-08 13:55                             ` Richard Purdie
2023-06-08 15:03                               ` Bruce Ashfield
2023-06-08 15:44                                 ` Richard Purdie
2023-06-08 16:16                                   ` Bruce Ashfield
2023-06-09  2:01                                     ` Yu, Mingli
2023-06-09  3:25                                       ` Bruce Ashfield
2023-06-09  3:31                                         ` Yu, Mingli

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=CANNYZj9xxEnyxEyWv9q4AY9Cj_zpw6fSyqc6uwLOwzkFYFnZvw@mail.gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=mingli.yu@eng.windriver.com \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).