diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2012-05-21 14:07:25 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-05-21 14:07:25 +0200 |
commit | f6330ed09c8632845410c0a75d629ecbae874382 (patch) | |
tree | 8dca0fd454f271f90a6c9569343b3d00b505efa6 /meta-oe/classes | |
parent | 72ab8b00416858877017c26a212ab6d4e87dc5b6 (diff) | |
download | meta-openembedded-f6330ed09c8632845410c0a75d629ecbae874382.tar.gz |
Revert "systemd.bbclass: drop postrm, use prerm instead"
This removed the $D check, which should stay
This reverts commit 637cb7e3d2cfdc74d239a4257e6f3477aa17da4e.
Diffstat (limited to 'meta-oe/classes')
-rw-r--r-- | meta-oe/classes/systemd.bbclass | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/meta-oe/classes/systemd.bbclass b/meta-oe/classes/systemd.bbclass index 1edd1e407..db35717f6 100644 --- a/meta-oe/classes/systemd.bbclass +++ b/meta-oe/classes/systemd.bbclass | |||
@@ -15,7 +15,12 @@ fi | |||
15 | } | 15 | } |
16 | 16 | ||
17 | systemd_prerm() { | 17 | systemd_prerm() { |
18 | systemctl stop ${SYSTEMD_SERVICE} | 18 | if [ -z "$D" ]; then |
19 | systemctl stop ${SYSTEMD_SERVICE} | ||
20 | fi | ||
21 | } | ||
22 | |||
23 | systemd_postrm() { | ||
19 | systemctl disable ${SYSTEMD_SERVICE} | 24 | systemctl disable ${SYSTEMD_SERVICE} |
20 | } | 25 | } |
21 | 26 | ||
@@ -88,7 +93,7 @@ do_install_append() { | |||
88 | 93 | ||
89 | python populate_packages_prepend () { | 94 | python populate_packages_prepend () { |
90 | def systemd_generate_package_scripts(pkg): | 95 | def systemd_generate_package_scripts(pkg): |
91 | bb.debug(1, 'adding systemd calls to postinst/prerm for %s' % pkg) | 96 | bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg) |
92 | localdata = bb.data.createCopy(d) | 97 | localdata = bb.data.createCopy(d) |
93 | overrides = bb.data.getVar("OVERRIDES", localdata, 1) | 98 | overrides = bb.data.getVar("OVERRIDES", localdata, 1) |
94 | bb.data.setVar("OVERRIDES", "%s:%s" % (pkg, overrides), localdata) | 99 | bb.data.setVar("OVERRIDES", "%s:%s" % (pkg, overrides), localdata) |
@@ -111,6 +116,12 @@ python populate_packages_prepend () { | |||
111 | prerm += bb.data.getVar('systemd_prerm', localdata, 1) | 116 | prerm += bb.data.getVar('systemd_prerm', localdata, 1) |
112 | bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d) | 117 | bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d) |
113 | 118 | ||
119 | postrm = bb.data.getVar('pkg_postrm', localdata, 1) | ||
120 | if not postrm: | ||
121 | postrm = '#!/bin/sh\n' | ||
122 | postrm += bb.data.getVar('systemd_postrm', localdata, 1) | ||
123 | bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d) | ||
124 | |||
114 | # add files to FILES_*-systemd if existent and not already done | 125 | # add files to FILES_*-systemd if existent and not already done |
115 | def systemd_append_file(pkg_systemd, file_append): | 126 | def systemd_append_file(pkg_systemd, file_append): |
116 | appended = False | 127 | appended = False |