Patchwork update-rc.d.bbclass: fix inhibit check

login
register
mail settings
Submitter Kang Kai
Date Feb. 20, 2014, 2:11 a.m.
Message ID <1392862269-14520-2-git-send-email-kai.kang@windriver.com>
Download mbox | patch
Permalink /patch/67019/
State New
Headers show

Comments

Kang Kai - Feb. 20, 2014, 2:11 a.m.
In update-rc.d.bbclass it checks variable INHIBIT_UPDATERCD_BBCLASS to
inhibit from inheriting this class. But it is wrong logic that when
'sysvinit' is in 'DISTRO_FEATURES', INHIBIT_UPDATERCD_BBCLASS will not
be checked.

Replace 'or' with 'and' to fix it.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/classes/update-rc.d.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Ross Burton - Feb. 21, 2014, 12:24 p.m.
On 20 February 2014 02:11, Kai Kang <kai.kang@windriver.com> wrote:
> In update-rc.d.bbclass it checks variable INHIBIT_UPDATERCD_BBCLASS to
> inhibit from inheriting this class. But it is wrong logic that when
> 'sysvinit' is in 'DISTRO_FEATURES', INHIBIT_UPDATERCD_BBCLASS will not
> be checked.

Not sure what I was thinking there, well spotted.

Reviewed-by: Ross Burton <ross.burton@intel.com>

Ross

Patch

diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 4b92d8d..0ac2af7 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -117,7 +117,7 @@  python populate_packages_updatercd () {
 
     # Check that this class isn't being inhibited (generally, by
     # systemd.bbclass) before doing any work.
-    if oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or \
+    if oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) and \
        not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
         pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
         if pkgs == None: