On Tue, 2023-05-30 at 21:17 +0800, Yu, Mingli wrote:
> From: Mingli Yu <[email protected]>
>
> 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.
>
> Signed-off-by: Mingli Yu <[email protected]>
> ---
> 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)
Are any of the architectures already in packages? I'm a little curious
if there are and why?
> + d.setVar('FILES:' + pn + "-" + arch, '${bindir}/qemu-' + arch)
> + d.appendVar('FILES:' + pn + "-" + arch, ' ' +
> '${bindir}/qemu-system-' + arch)
Why set a variable, then append to it?
> + if arch == "mips":
> + d.appendVar('RDEPENDS:' + pn + '-' + arch, ' ' + 'bash')
May as well just do:
RDEPENDS:${PN}-mips += "bash"
?
> + packages = newpackages + packages
> + d.setVar('PACKAGES', ' '.join(packages))
> +}
Also, should the main qemu package pull in all the other subpackages?
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181923):
https://lists.openembedded.org/g/openembedded-core/message/181923
Mute This Topic: https://lists.openembedded.org/mt/99219254/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-