summaryrefslogtreecommitdiffstats
path: root/meta-systemd
diff options
context:
space:
mode:
Diffstat (limited to 'meta-systemd')
-rw-r--r--meta-systemd/classes/systemd.bbclass28
1 files changed, 14 insertions, 14 deletions
diff --git a/meta-systemd/classes/systemd.bbclass b/meta-systemd/classes/systemd.bbclass
index 96d7f8f559..f26c6d1c1c 100644
--- a/meta-systemd/classes/systemd.bbclass
+++ b/meta-systemd/classes/systemd.bbclass
@@ -29,9 +29,9 @@ systemctl disable ${SYSTEMD_SERVICE}
29} 29}
30 30
31def get_package_var(d, var, pkg): 31def get_package_var(d, var, pkg):
32 val = (d.getVar('%s_%s' % (var, pkg), d, 1) or "").strip() 32 val = (d.getVar('%s_%s' % (var, pkg), 1) or "").strip()
33 if val == "": 33 if val == "":
34 val = (d.getVar(var, d, 1) or "").strip() 34 val = (d.getVar(var, 1) or "").strip()
35 return val 35 return val
36 36
37def systemd_after_parse(d): 37def systemd_after_parse(d):
@@ -94,9 +94,9 @@ do_install_append() {
94python populate_packages_prepend () { 94python populate_packages_prepend () {
95 def systemd_generate_package_scripts(pkg): 95 def systemd_generate_package_scripts(pkg):
96 bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg) 96 bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)
97 localdata = bb.data.createCopy(d) 97 localdata = d.createCopy()
98 overrides = bb.data.getVar("OVERRIDES", localdata, 1) 98 overrides = localdata.getVar("OVERRIDES", 1)
99 bb.data.setVar("OVERRIDES", "%s:%s" % (pkg, overrides), localdata) 99 localdata.setVar("OVERRIDES", "%s:%s" % (pkg, overrides))
100 bb.data.update_data(localdata) 100 bb.data.update_data(localdata)
101 101
102 """ 102 """
@@ -104,23 +104,23 @@ python populate_packages_prepend () {
104 execute on the target. Not doing so may cause systemd postinst invoked 104 execute on the target. Not doing so may cause systemd postinst invoked
105 twice to cause unwanted warnings. 105 twice to cause unwanted warnings.
106 """ 106 """
107 postinst = bb.data.getVar('pkg_postinst', localdata, 1) 107 postinst = localdata.getVar('pkg_postinst', 1)
108 if not postinst: 108 if not postinst:
109 postinst = '#!/bin/sh\n' 109 postinst = '#!/bin/sh\n'
110 postinst += bb.data.getVar('systemd_postinst', localdata, 1) 110 postinst += localdata.getVar('systemd_postinst', 1)
111 bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) 111 d.setVar('pkg_postinst_%s' % pkg, postinst)
112 112
113 prerm = bb.data.getVar('pkg_prerm', localdata, 1) 113 prerm = localdata.getVar('pkg_prerm', 1)
114 if not prerm: 114 if not prerm:
115 prerm = '#!/bin/sh\n' 115 prerm = '#!/bin/sh\n'
116 prerm += bb.data.getVar('systemd_prerm', localdata, 1) 116 prerm += localdata.getVar('systemd_prerm', 1)
117 bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d) 117 d.setVar('pkg_prerm_%s' % pkg, prerm)
118 118
119 postrm = bb.data.getVar('pkg_postrm', localdata, 1) 119 postrm = localdata.getVar('pkg_postrm', 1)
120 if not postrm: 120 if not postrm:
121 postrm = '#!/bin/sh\n' 121 postrm = '#!/bin/sh\n'
122 postrm += bb.data.getVar('systemd_postrm', localdata, 1) 122 postrm += localdata.getVar('systemd_postrm', 1)
123 bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d) 123 d.setVar('pkg_postrm_%s' % pkg, postrm)
124 124
125 # add files to FILES_*-systemd if existent and not already done 125 # add files to FILES_*-systemd if existent and not already done
126 def systemd_append_file(pkg_systemd, file_append): 126 def systemd_append_file(pkg_systemd, file_append):