All of lore.kernel.org
 help / color / mirror / Atom feed
From: Otavio Salvador <otavio@ossystems.com.br>
To: Meta-OpenEmbedded Mailing listing
	<openembedded-devel@lists.openembedded.org>
Subject: [meta-oe backport krogoth PATCH 12/22] syslog-ng.inc: fix prerm script & class includes
Date: Fri,  6 May 2016 11:00:49 -0300	[thread overview]
Message-ID: <1462543259-7206-12-git-send-email-otavio@ossystems.com.br> (raw)
In-Reply-To: <1462543259-7206-1-git-send-email-otavio@ossystems.com.br>

From: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>

The order of class includes is very important because it's the order in
which classes are evaluated. Both update-rc.d and update-alternatives
write to the prerm script, so the class order decides the script code
ordering. As they are now, prerm is:

 #!/bin/sh
        update-alternatives --remove  syslog-init /etc/init.d/syslog.syslog-ng
if [ -z "$D" ]; then
        /etc/init.d/syslog stop
fi

This causes errors because when syslog-ng is the only alternative it is
removed and then the script tries to stop it (No such file or directory)
but even if there are other alternatives, the script tries to stop
something other than syslog-ng which was removed.

By reversing the include order, prerm gets generated correctly and it
tries to stop syslog-ng before removing it:

if [ -z "$D" ]; then
        /etc/init.d/syslog stop
fi
update-alternatives --remove  syslog-init /etc/init.d/syslog.syslog-ng

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

 meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
index 382dc5e..4e0f697 100644
--- a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
+++ b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
@@ -22,7 +22,7 @@ SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source
            file://configure.ac-add-option-enable-thread-tls-to-manage-.patch \
 "
 
-inherit autotools systemd pkgconfig update-rc.d update-alternatives
+inherit autotools systemd pkgconfig update-alternatives update-rc.d
 
 EXTRA_OECONF = " \
     --enable-dynamic-linking \
-- 
2.8.2



  parent reply	other threads:[~2016-05-06 14:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06 14:00 [meta-oe backport krogoth PATCH 01/22] net-snmp: enable ipv6 support Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 02/22] dovecot: fix QA issue and remove from blacklist Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 03/22] proftpd: CVE-2016-3125 Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 04/22] openconnect: add missing dependencies Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 05/22] rp-pppoe: Fix rootfs creation errors Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 06/22] meta-networking: use bb.utils.contains() instead of base_contains() Otavio Salvador
2016-05-07 17:37   ` akuster808
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 07/22] squid: CVE-2016-3947 Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 08/22] ltrace: Error Fix for ARM Otavio Salvador
2016-05-06 14:16   ` Martin Jansa
2016-05-06 14:20     ` Otavio Salvador
2016-05-06 14:33       ` Martin Jansa
2016-05-06 15:52         ` akuster808
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 09/22] ltrace: Remove deprecated readdir_r() Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 10/22] fbida: use separate builddir Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 11/22] sblim-sfcb: add missing dependency on unzip-native Otavio Salvador
2016-05-06 14:00 ` Otavio Salvador [this message]
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 13/22] sox: dep on ffmpeg, not libav Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 14/22] meta-xfce: add intltool-native to DEPENDS Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 15/22] xfce-polkit: fix warning not able to copy license Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 16/22] fluidsynth: set correct portaudio packageconfig dependency Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 17/22] glmark2: wl_surface should be destoryed after destroying wl_window Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 18/22] packagegroup-tools-bluetooth.bb: Selects the tools appropriate for the version of bluez being used Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 19/22] opencv: Fix metapkg dependencies for opencv-java and opencv-locales Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 20/22] python-pyparsing: modify build to correctly use setuptools rather than distutils Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 21/22] rrdtool: fix do_configure failure on some hosts Otavio Salvador
2016-05-06 14:00 ` [meta-oe backport krogoth PATCH 22/22] toybox: Remove out-of-date patch Otavio Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462543259-7206-12-git-send-email-otavio@ossystems.com.br \
    --to=otavio@ossystems.com.br \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.