Message ID | 20230609030418.540053-1-mingli.yu@eng.windriver.com |
---|---|
State | Accepted, archived |
Commit | 893846ead7ee54d53e9076150cd655e0c8bca5db |
Headers | show |
Series | [v6] qemu: Split the qemu package | expand |
On Fri, Jun 9, 2023 at 5:04 AM Yu, Mingli <mingli.yu@eng.windriver.com> wrote: > + if userpackages: > + d.setVar('RDEPENDS:' + d.getVar('PN') + '-user-all', ' > '.join(userpackages)) > + mipspackage = d.getVar('PN') + "-user-mips" > + if mipspackage in ' '.join(userpackages): > + d.appendVar('RDEPENDS:' + mipspackage, ' ' + d.getVar("MLPREFIX") > + 'bash') > This is just a style question, you don't need to update. Is it worth making this conditional on ${PN}-user-mips existence? I would just use RDEPENDS:${PN}-user-mips = "bash" outside this function and I don't think you would even need to explicitly use ${MLPREFIX}. Nothing will break when ${PN}-user-mips doesn't exist (e.g. when splitting is disabled) and it's a bit easier to read than corresponding 3 lines in python.
I'm seeing following QA issue after this change: On Fri, 9 Jun 2023 at 08:22, Martin Jansa <Martin.Jansa@gmail.com> wrote: > On Fri, Jun 9, 2023 at 5:04 AM Yu, Mingli <mingli.yu@eng.windriver.com> > wrote: > >> + if userpackages: >> + d.setVar('RDEPENDS:' + d.getVar('PN') + '-user-all', ' >> '.join(userpackages)) >> + mipspackage = d.getVar('PN') + "-user-mips" >> + if mipspackage in ' '.join(userpackages): >> + d.appendVar('RDEPENDS:' + mipspackage, ' ' + >> d.getVar("MLPREFIX") + 'bash') >> > > This is just a style question, you don't need to update. > > Is it worth making this conditional on ${PN}-user-mips existence? I would > just use > > RDEPENDS:${PN}-user-mips = "bash" > > outside this function and I don't think you would even need to explicitly > use ${MLPREFIX}. Nothing will break when ${PN}-user-mips doesn't exist > (e.g. when splitting is disabled) and it's a bit easier to read than > corresponding 3 lines in python. > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#182530): > https://lists.openembedded.org/g/openembedded-core/message/182530 > Mute This Topic: https://lists.openembedded.org/mt/99421260/3617605 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > samuli.piippo@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
I'm seeing following QA issue after this change: ERROR: nativesdk-qemu-8.0.0-r0 do_package_qa: QA Issue: nativesdk-qemu-user-mips rdepends on nativesdk-bash, but it isn't a build dependency, missing nativesdk-bash in DEPENDS or PACKAGECONFIG? [build-deps] ERROR: nativesdk-qemu-8.0.0-r0 do_package_qa: Fatal QA errors were found, failing task. On Fri, 9 Jun 2023 at 08:22, Martin Jansa <Martin.Jansa@gmail.com> wrote: > On Fri, Jun 9, 2023 at 5:04 AM Yu, Mingli <mingli.yu@eng.windriver.com> > wrote: > >> + if userpackages: >> + d.setVar('RDEPENDS:' + d.getVar('PN') + '-user-all', ' >> '.join(userpackages)) >> + mipspackage = d.getVar('PN') + "-user-mips" >> + if mipspackage in ' '.join(userpackages): >> + d.appendVar('RDEPENDS:' + mipspackage, ' ' + >> d.getVar("MLPREFIX") + 'bash') >> > > This is just a style question, you don't need to update. > > Is it worth making this conditional on ${PN}-user-mips existence? I would > just use > > RDEPENDS:${PN}-user-mips = "bash" > > outside this function and I don't think you would even need to explicitly > use ${MLPREFIX}. Nothing will break when ${PN}-user-mips doesn't exist > (e.g. when splitting is disabled) and it's a bit easier to read than > corresponding 3 lines in python. > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#182530): > https://lists.openembedded.org/g/openembedded-core/message/182530 > Mute This Topic: https://lists.openembedded.org/mt/99421260/3617605 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > samuli.piippo@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index a87dee5c99..6acda61425 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -230,6 +230,28 @@ INSANE_SKIP:${PN} = "arch" FILES:${PN} += "${datadir}/icons" +# For user who want to install all arch packages +PACKAGES =+ "${PN}-system-all ${PN}-user-all" + +ALLOW_EMPTY:${PN}-system-all = "1" +ALLOW_EMPTY:${PN}-user-all = "1" + +PACKAGESPLITFUNCS =+ "split_qemu_packages" + +python split_qemu_packages () { + archdir = d.expand('${bindir}/') + syspackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', '${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True) + if syspackages: + d.setVar('RDEPENDS:' + d.getVar('PN') + '-system-all', ' '.join(syspackages)) + + userpackages = do_split_packages(d, archdir, r'^qemu-((?!system|edid|ga|img|io|nbd|pr-helper|storage-daemon).*)$', '${PN}-user-%s', 'QEMU full user emulation binaries(%s)' , prepend=True) + if userpackages: + d.setVar('RDEPENDS:' + d.getVar('PN') + '-user-all', ' '.join(userpackages)) + mipspackage = d.getVar('PN') + "-user-mips" + if mipspackage in ' '.join(userpackages): + d.appendVar('RDEPENDS:' + mipspackage, ' ' + d.getVar("MLPREFIX") + 'bash') +} + # Put the guest agent in a separate package PACKAGES =+ "${PN}-guest-agent" SUMMARY:${PN}-guest-agent = "QEMU guest agent"