All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] systemd.bbclass: drop postrm, use prerm instead
@ 2012-05-16 16:56 Andreas Oberritter
  2012-05-16 18:11 ` Otavio Salvador
  2012-05-21 12:10 ` Koen Kooi
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Oberritter @ 2012-05-16 16:56 UTC (permalink / raw)
  To: openembedded-devel

* 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@opendreambox.org>
---
 meta-oe/classes/systemd.bbclass |   15 ++-------------
 1 file 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
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [meta-oe][PATCH] systemd.bbclass: drop postrm, use prerm instead
  2012-05-16 16:56 [meta-oe][PATCH] systemd.bbclass: drop postrm, use prerm instead Andreas Oberritter
@ 2012-05-16 18:11 ` Otavio Salvador
  2012-05-21 12:10 ` Koen Kooi
  1 sibling, 0 replies; 4+ messages in thread
From: Otavio Salvador @ 2012-05-16 18:11 UTC (permalink / raw)
  To: openembedded-devel

On Wed, May 16, 2012 at 1:56 PM, Andreas Oberritter
<obi@opendreambox.org> wrote:
> * 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@opendreambox.org>

Acked-by: Otavio Salvador <otavio@ossystems.com.br>

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-oe][PATCH] systemd.bbclass: drop postrm, use prerm instead
  2012-05-16 16:56 [meta-oe][PATCH] systemd.bbclass: drop postrm, use prerm instead Andreas Oberritter
  2012-05-16 18:11 ` Otavio Salvador
@ 2012-05-21 12:10 ` Koen Kooi
  2012-05-21 13:12   ` Andreas Oberritter
  1 sibling, 1 reply; 4+ messages in thread
From: Koen Kooi @ 2012-05-21 12:10 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 16-05-12 18:56, Andreas Oberritter schreef:
> * 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.

"Messing" with $D *is* needed in *rm scripts, so this one has been reverted.
Feel free to resend patches with only the postrm/prerm changes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFPujCtMkyGM64RGpERAioSAJ9ibwFXxdJSPXh7iKMrxM/PiKOgXACfQ0Sc
TUWKlfzL12Y8BJ7gYw3gUBA=
=q4Bf
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-oe][PATCH] systemd.bbclass: drop postrm, use prerm instead
  2012-05-21 12:10 ` Koen Kooi
@ 2012-05-21 13:12   ` Andreas Oberritter
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Oberritter @ 2012-05-21 13:12 UTC (permalink / raw)
  To: openembedded-devel

On 21.05.2012 14:10, Koen Kooi wrote:
> Op 16-05-12 18:56, Andreas Oberritter schreef:
>> * 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.
> 
> "Messing" with $D *is* needed in *rm scripts, so this one has been reverted.
> Feel free to resend patches with only the postrm/prerm changes.

Feel free to do it yourself.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-21 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16 16:56 [meta-oe][PATCH] systemd.bbclass: drop postrm, use prerm instead Andreas Oberritter
2012-05-16 18:11 ` Otavio Salvador
2012-05-21 12:10 ` Koen Kooi
2012-05-21 13:12   ` Andreas Oberritter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.