summaryrefslogtreecommitdiffstats
path: root/meta/classes/packagegroup.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/packagegroup.bbclass')
-rw-r--r--meta/classes/packagegroup.bbclass52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/classes/packagegroup.bbclass b/meta/classes/packagegroup.bbclass
new file mode 100644
index 0000000000..56cfead82a
--- /dev/null
+++ b/meta/classes/packagegroup.bbclass
@@ -0,0 +1,52 @@
1# Class for packagegroup (package group) recipes
2
3# By default, only the packagegroup package itself is in PACKAGES.
4# -dbg and -dev flavours are handled by the anonfunc below.
5# This means that packagegroup recipes used to build multiple packagegroup
6# packages have to modify PACKAGES after inheriting packagegroup.bbclass.
7PACKAGES = "${PN}"
8
9# By default, packagegroup packages do not depend on a certain architecture.
10# Only if dependencies are modified by MACHINE_FEATURES, packages
11# need to be set to MACHINE_ARCH after inheriting packagegroup.bbclass
12PACKAGE_ARCH ?= "all"
13
14# Fully expanded - so it applies the overrides as well
15PACKAGE_ARCH_EXPANDED := "${PACKAGE_ARCH}"
16
17inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED', True) == 'all', 'allarch', '')}
18
19# This automatically adds -dbg and -dev flavours of all PACKAGES
20# to the list. Their dependencies (RRECOMMENDS) are handled as usual
21# by package_depchains in a following step.
22# Also mark all packages as ALLOW_EMPTY
23python () {
24 packages = d.getVar('PACKAGES', True).split()
25 genpackages = []
26 for pkg in packages:
27 d.setVar("ALLOW_EMPTY_%s" % pkg, "1")
28 for postfix in ['-dbg', '-dev', '-ptest']:
29 genpackages.append(pkg+postfix)
30 if d.getVar('PACKAGEGROUP_DISABLE_COMPLEMENTARY', True) != '1':
31 d.setVar('PACKAGES', ' '.join(packages+genpackages))
32}
33
34# We don't want to look at shared library dependencies for the
35# dbg packages
36DEPCHAIN_DBGDEFAULTDEPS = "1"
37
38# We only need the packaging tasks - disable the rest
39do_fetch[noexec] = "1"
40do_unpack[noexec] = "1"
41do_patch[noexec] = "1"
42do_configure[noexec] = "1"
43do_compile[noexec] = "1"
44do_install[noexec] = "1"
45do_populate_sysroot[noexec] = "1"
46
47python () {
48 initman = d.getVar("VIRTUAL-RUNTIME_init_manager", True)
49 if initman and initman in ['sysvinit', 'systemd'] and not bb.utils.contains('DISTRO_FEATURES', initman, True, False, d):
50 bb.fatal("Please ensure that your setting of VIRTUAL-RUNTIME_init_manager (%s) matches the entries enabled in DISTRO_FEATURES" % initman)
51}
52