[oe-commits] Andreas Oberritter : systemd.bbclass: drop postrm, use prerm instead
git at git.openembedded.org
git at git.openembedded.org
Thu May 17 07:46:24 UTC 2012
Module: meta-openembedded.git
Branch: master
Commit: 637cb7e3d2cfdc74d239a4257e6f3477aa17da4e
URL: http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=637cb7e3d2cfdc74d239a4257e6f3477aa17da4e
Author: Andreas Oberritter <obi at opendreambox.org>
Date: Wed May 16 16:56:01 2012 +0000
systemd.bbclass: drop postrm, use prerm instead
* Calling "systemctl disable" from postrm is too late and
causes the following error:
| Failed to issue method call: No such file or directory
* Messing with $D is not needed in *rm scripts.
Signed-off-by: Andreas Oberritter <obi at opendreambox.org>
Acked-by: Otavio Salvador <otavio at ossystems.com.br>
Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>
---
meta-oe/classes/systemd.bbclass | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/meta-oe/classes/systemd.bbclass b/meta-oe/classes/systemd.bbclass
index db35717..1edd1e4 100644
--- a/meta-oe/classes/systemd.bbclass
+++ b/meta-oe/classes/systemd.bbclass
@@ -15,12 +15,7 @@ fi
}
systemd_prerm() {
-if [ -z "$D" ]; then
- systemctl stop ${SYSTEMD_SERVICE}
-fi
-}
-
-systemd_postrm() {
+systemctl stop ${SYSTEMD_SERVICE}
systemctl disable ${SYSTEMD_SERVICE}
}
@@ -93,7 +88,7 @@ do_install_append() {
python populate_packages_prepend () {
def systemd_generate_package_scripts(pkg):
- bb.debug(1, 'adding systemd calls to postinst/postrm for %s' % pkg)
+ bb.debug(1, 'adding systemd calls to postinst/prerm for %s' % pkg)
localdata = bb.data.createCopy(d)
overrides = bb.data.getVar("OVERRIDES", localdata, 1)
bb.data.setVar("OVERRIDES", "%s:%s" % (pkg, overrides), localdata)
@@ -116,12 +111,6 @@ python populate_packages_prepend () {
prerm += bb.data.getVar('systemd_prerm', localdata, 1)
bb.data.setVar('pkg_prerm_%s' % pkg, prerm, d)
- postrm = bb.data.getVar('pkg_postrm', localdata, 1)
- if not postrm:
- postrm = '#!/bin/sh\n'
- postrm += bb.data.getVar('systemd_postrm', localdata, 1)
- bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
-
# add files to FILES_*-systemd if existent and not already done
def systemd_append_file(pkg_systemd, file_append):
appended = False
More information about the Openembedded-commits
mailing list