From patchwork Fri Nov 16 16:21:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: systemd.bbclass: move disable operation into prerm() script Date: Fri, 16 Nov 2012 16:21:33 -0000 From: Enrico Scholz X-Patchwork-Id: 39161 Message-Id: <1353082893-16665-1-git-send-email-enrico.scholz@sigma-chemnitz.de> To: openembedded-devel@lists.openembedded.org Cc: Enrico Scholz The 'systemctl disable' operation should not be done in postrm() because the .service file does not exist anymore and the script will fail hence. After moving this command into prerm(), postrm() becomes empty and can be removed completely. Signed-off-by: Enrico Scholz Acked-by: Otavio Salvador --- meta-systemd/classes/systemd.bbclass | 8 -------- 1 file changed, 8 deletions(-) diff --git a/meta-systemd/classes/systemd.bbclass b/meta-systemd/classes/systemd.bbclass index f26c6d1..e1916a0 100644 --- a/meta-systemd/classes/systemd.bbclass +++ b/meta-systemd/classes/systemd.bbclass @@ -22,9 +22,7 @@ systemd_prerm() { if [ -z "$D" ]; then systemctl stop ${SYSTEMD_SERVICE} fi -} -systemd_postrm() { systemctl disable ${SYSTEMD_SERVICE} } @@ -116,12 +114,6 @@ python populate_packages_prepend () { prerm += localdata.getVar('systemd_prerm', 1) d.setVar('pkg_prerm_%s' % pkg, prerm) - postrm = localdata.getVar('pkg_postrm', 1) - if not postrm: - postrm = '#!/bin/sh\n' - postrm += localdata.getVar('systemd_postrm', 1) - d.setVar('pkg_postrm_%s' % pkg, postrm) - # add files to FILES_*-systemd if existent and not already done def systemd_append_file(pkg_systemd, file_append): appended = False