diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-01-25 15:00:27 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-02-01 22:49:44 +0300 |
commit | 038b44be9a95f0298243cbdcaa99aeed5fa7db2c (patch) | |
tree | 422070688343d760098fd8e5cf711fc2c96e4992 /meta-phosphor/classes | |
parent | 096e4b470664f67d747dfa0cbf5c5e8adf230eb6 (diff) | |
download | openbmc-038b44be9a95f0298243cbdcaa99aeed5fa7db2c.tar.xz |
systemd: limit bbclass hooks to class-target scope
Allow the phosphor systemd and dbus bbclasses to be inherited
by recipes using BBCLASSEXTEND (native, etc). No-op in non-target
recipe class context.
Tested: Built an image and verified dbus and systemd unit files.
Change-Id: Ib2f64233f89d05679c568527a074d9236729201f
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/classes')
-rw-r--r-- | meta-phosphor/classes/obmc-phosphor-dbus-service.bbclass | 7 | ||||
-rw-r--r-- | meta-phosphor/classes/obmc-phosphor-systemd.bbclass | 8 |
2 files changed, 10 insertions, 5 deletions
diff --git a/meta-phosphor/classes/obmc-phosphor-dbus-service.bbclass b/meta-phosphor/classes/obmc-phosphor-dbus-service.bbclass index 029d26093..77fffe0ab 100644 --- a/meta-phosphor/classes/obmc-phosphor-dbus-service.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-dbus-service.bbclass @@ -124,6 +124,11 @@ python() { % (d.getVar('dbus_system_servicesdir', True), search_match)) + if d.getVar('CLASSOVERRIDE', True) != 'class-target': + return + + d.appendVarFlag('do_install', 'postfuncs', ' dbus_do_postinst') + for pkg in listvar_to_list(d, 'DBUS_PACKAGES'): if pkg not in (d.getVar('SYSTEMD_PACKAGES', True) or ''): set_append(d, 'SYSTEMD_PACKAGES', pkg) @@ -169,6 +174,4 @@ do_install_append() { done } -do_install[postfuncs] += "dbus_do_postinst" - inherit obmc-phosphor-systemd diff --git a/meta-phosphor/classes/obmc-phosphor-systemd.bbclass b/meta-phosphor/classes/obmc-phosphor-systemd.bbclass index c6a2e6986..3a3234f5e 100644 --- a/meta-phosphor/classes/obmc-phosphor-systemd.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-systemd.bbclass @@ -198,6 +198,11 @@ python() { add_sd_user(d, '%s' % dest, pkg) + if d.getVar('CLASSOVERRIDE', True) != 'class-target': + return + + d.appendVarFlag('do_install', 'postfuncs', ' systemd_do_postinst') + pn = d.getVar('PN', True) if d.getVar('SYSTEMD_SERVICE_%s' % pn, True) is None: d.setVar('SYSTEMD_SERVICE_%s' % pn, '%s.service' % pn) @@ -326,6 +331,3 @@ do_install_append() { ${D}${systemd_system_unitdir}/$s done } - - -do_install[postfuncs] += "systemd_do_postinst" |