Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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. |
| 7 | PACKAGES = "${PN}" |
| 8 | |
| 9 | # By default, packagegroup packages do not depend on a certain architecture. |
| 10 | # Only if dependencies are modified by MACHINE_FEATURES, packages |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame^] | 11 | # need to be set to MACHINE_ARCH before inheriting packagegroup.bbclass |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | PACKAGE_ARCH ?= "all" |
| 13 | |
| 14 | # Fully expanded - so it applies the overrides as well |
| 15 | PACKAGE_ARCH_EXPANDED := "${PACKAGE_ARCH}" |
| 16 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 17 | LICENSE ?= "MIT" |
| 18 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 19 | inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED') == 'all', 'allarch', '')} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | |
| 21 | # This automatically adds -dbg and -dev flavours of all PACKAGES |
| 22 | # to the list. Their dependencies (RRECOMMENDS) are handled as usual |
| 23 | # by package_depchains in a following step. |
| 24 | # Also mark all packages as ALLOW_EMPTY |
| 25 | python () { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 26 | packages = d.getVar('PACKAGES').split() |
| 27 | if d.getVar('PACKAGEGROUP_DISABLE_COMPLEMENTARY') != '1': |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 28 | types = ['', '-dbg', '-dev'] |
| 29 | if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d): |
| 30 | types.append('-ptest') |
| 31 | packages = [pkg + suffix for pkg in packages |
| 32 | for suffix in types] |
| 33 | d.setVar('PACKAGES', ' '.join(packages)) |
| 34 | for pkg in packages: |
| 35 | d.setVar('ALLOW_EMPTY_%s' % pkg, '1') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | # We don't want to look at shared library dependencies for the |
| 39 | # dbg packages |
| 40 | DEPCHAIN_DBGDEFAULTDEPS = "1" |
| 41 | |
| 42 | # We only need the packaging tasks - disable the rest |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 43 | deltask do_fetch |
| 44 | deltask do_unpack |
| 45 | deltask do_patch |
| 46 | deltask do_configure |
| 47 | deltask do_compile |
| 48 | deltask do_install |
| 49 | deltask do_populate_sysroot |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 50 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 51 | INHIBIT_DEFAULT_DEPS = "1" |
| 52 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 53 | python () { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 54 | if bb.data.inherits_class('nativesdk', d): |
| 55 | return |
| 56 | initman = d.getVar("VIRTUAL-RUNTIME_init_manager") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 57 | if initman and initman in ['sysvinit', 'systemd'] and not bb.utils.contains('DISTRO_FEATURES', initman, True, False, d): |
| 58 | bb.fatal("Please ensure that your setting of VIRTUAL-RUNTIME_init_manager (%s) matches the entries enabled in DISTRO_FEATURES" % initman) |
| 59 | } |
| 60 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 61 | CVE_PRODUCT = "" |