I have made the following changes intended for :
  CE:MW:Shared / ohm

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/6723

Thank You,
Juho Hämäläinen

[This message was auto-generated]

---

Request # 6723:

Messages from BOSS:

State: review at 2012-09-07T12:16:40 by bossbot

Reviews:
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: home:jhamalai:branches:CE:MW:Shared / ohm -> CE:MW:Shared / ohm
  
changes files:
--------------
--- ohm.changes
+++ ohm.changes
@@ -0,0 +1,3 @@
+* Fri Sep 07 2012 Juho Hamalainen <[email protected]> - 1.1.14
+- Fixes NEMO#322: Allow ohmd to run without modules.
+

new:
----
  allow-ohmd-to-run-without-modules.patch

spec files:
-----------
--- ohm.spec
+++ ohm.spec
@@ -18,9 +18,10 @@
 Source1:    ohm-rpmlintrc
 Source100:  ohm.yaml
 Patch0:     board-and-platform-specific-conf.patch
-Patch1:     meego-distro.patch
-Patch2:     compiler-warn-fix.patch
-Patch3:     0001-Remove-After-syslog.target.patch
+Patch1:     allow-ohmd-to-run-without-modules.patch
+Patch2:     meego-distro.patch
+Patch3:     compiler-warn-fix.patch
+Patch4:     0001-Remove-After-syslog.target.patch
 Requires:   ohm-config
 Requires:   boardname >= 0.4.1
 Requires:   systemd
@@ -73,12 +74,14 @@
 
 # board-and-platform-specific-conf.patch
 %patch0 -p1
-# meego-distro.patch
+# allow-ohmd-to-run-without-modules.patch
 %patch1 -p1
-# compiler-warn-fix.patch
+# meego-distro.patch
 %patch2 -p1
-# 0001-Remove-After-syslog.target.patch
+# compiler-warn-fix.patch
 %patch3 -p1
+# 0001-Remove-After-syslog.target.patch
+%patch4 -p1
 # >> setup
 # << setup
 

other changes:
--------------

++++++ allow-ohmd-to-run-without-modules.patch (new)
--- allow-ohmd-to-run-without-modules.patch
+++ allow-ohmd-to-run-without-modules.patch
@@ -0,0 +1,41 @@
+From 5a2af838d3de151af70255c322f4b7b6fbb72ff2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Juho=20H=C3=A4m=C3=A4l=C3=A4inen?= <[email protected]>
+Date: Fri, 7 Sep 2012 13:02:33 +0300
+Subject: [PATCH] Allow ohmd to run without modules.
+
+A bug in ohm-module.c init causes ohmd to abort
+if zero modules are being loaded. This fixes it
+and ohmd can be run without loading any modules.
+---
+ ohmd/ohm-module.c |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/ohmd/ohm-module.c b/ohmd/ohm-module.c
+index e2f7890..c7b2a7a 100644
+--- a/ohmd/ohm-module.c
++++ b/ohmd/ohm-module.c
+@@ -416,6 +416,11 @@ ohm_module_reorder_plugins(OhmModule *module)
+     nplugin++;
+   
+   DEBUG(DBG_GRAPH, "found %d plugins to sort", nplugin);
++
++  /* Zero plugins is not useful way to run ohmd, but
++   * it still should be possible. */
++  if (nplugin == 0)
++    return TRUE;
+   
+   plugins = g_new0(OhmPlugin *, nplugin);
+   if (plugins == NULL)
+@@ -1316,6 +1321,9 @@ ohm_module_init (OhmModule *module)
+       }
+       ohm_conf_set_initializing (module->priv->conf, FALSE);
+         free(conf_prefix); 
++
++      if (!module->priv->plugins)
++              g_warning ("no plugins loaded!");
+ }
+ 
+ /**
+-- 
+1.7.0.4
+

++++++ ohm.yaml
--- ohm.yaml
+++ ohm.yaml
@@ -13,6 +13,7 @@
 
 Patches:
     - board-and-platform-specific-conf.patch
+    - allow-ohmd-to-run-without-modules.patch
     - meego-distro.patch
     - compiler-warn-fix.patch
     - 0001-Remove-After-syslog.target.patch



Reply via email to