summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu.inc
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2023-07-17 15:11:14 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-08-15 08:15:25 +0100
commit3abd781d34402cd5d605769f02fa0be2476a69cc (patch)
treea533e1fa8597d1aa70addf8d028ac7166ed29b38 /meta/recipes-devtools/qemu/qemu.inc
parentd57e6de496621cb721ef0eb23efa1bdb1363d8cb (diff)
downloadpoky-3abd781d34402cd5d605769f02fa0be2476a69cc.tar.gz
qemu: Add qemu-common package
We split the qemu package [1] to add support to make user can install one qemu arch emulation rpm to ease the concerns who care much about the rpm size in embedded device. But for the user who only install the qemu-*.rpm can't do anything except they install the qemu emulation rpm like qemu-system-x86-64-*.rpm explicitly. So add qemu-common package to package all thing into qemu-common when not split the package, and package only the basic into qemu-common and other arch related to each qemu arch emulation rpm when split the package to fix the backward compatibility. qenu-*.rpm which is meta package rdepends on qemu-common and the available qemu arch emulation rpm like qemu-system-x86-64-*.rpm and etc. [1] https://git.openembedded.org/openembedded-core/commit/?id=893846ead7ee54d53e9076150cd655e0c8bca5db (From OE-Core rev: 91c47aa06170081b64500471a39999b42cb1f400) Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu.inc')
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc23
1 files changed, 12 insertions, 11 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 64bade86aa..eaabc0e706 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -220,15 +220,18 @@ PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi"
220PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack," 220PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack,"
221PACKAGECONFIG[debuginfo] = "--enable-libdw,--disable-libdw,elfutils" 221PACKAGECONFIG[debuginfo] = "--enable-libdw,--disable-libdw,elfutils"
222 222
223INSANE_SKIP:${PN} = "arch" 223INSANE_SKIP:${PN}-common = "arch"
224 224
225FILES:${PN} += "${datadir}/icons" 225FILES:${PN} += "${datadir}/icons"
226 226
227# For user who want to install all arch packages 227# For user who want to install all arch packages
228PACKAGES =+ "${PN}-system-all ${PN}-user-all" 228PACKAGES =+ "${PN}-common"
229RDEPENDS:${PN} += "${PN}-common"
229 230
230ALLOW_EMPTY:${PN}-system-all = "1" 231ALLOW_EMPTY:${PN} = "1"
231ALLOW_EMPTY:${PN}-user-all = "1" 232FILES:${PN} = ""
233
234FILES:${PN}-common = "${bindir}/* ${includedir}/* ${libexecdir}/* ${datadir}/* ${localstatedir}"
232 235
233PACKAGES_DYNAMIC += "^${PN}-user-.* ^${PN}-system-.*" 236PACKAGES_DYNAMIC += "^${PN}-user-.* ^${PN}-system-.*"
234 237
@@ -236,15 +239,13 @@ PACKAGESPLITFUNCS =+ "split_qemu_packages"
236 239
237python split_qemu_packages () { 240python split_qemu_packages () {
238 archdir = d.expand('${bindir}/') 241 archdir = d.expand('${bindir}/')
239 syspackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', '${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True) 242 subpackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', '${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True, extra_depends='${PN}-common')
240 if syspackages:
241 d.setVar('RDEPENDS:' + d.getVar('PN') + '-system-all', ' '.join(syspackages))
242 243
243 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) 244 subpackages += 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, extra_depends='${PN}-common')
244 if userpackages: 245 if subpackages:
245 d.setVar('RDEPENDS:' + d.getVar('PN') + '-user-all', ' '.join(userpackages)) 246 d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(subpackages))
246 mipspackage = d.getVar('PN') + "-user-mips" 247 mipspackage = d.getVar('PN') + "-user-mips"
247 if mipspackage in ' '.join(userpackages): 248 if mipspackage in ' '.join(subpackages):
248 d.appendVar('RDEPENDS:' + mipspackage, ' ' + d.getVar("MLPREFIX") + 'bash') 249 d.appendVar('RDEPENDS:' + mipspackage, ' ' + d.getVar("MLPREFIX") + 'bash')
249} 250}
250 251