[gnucash] Fix glade usage by promoting symbol visibility on module open

Bill Nottingham notting at fedoraproject.org
Fri Oct 14 21:38:21 UTC 2011


commit 42bd8f32ddb3629aed9ad679694e43b16a4a08c0
Author: Bill Nottingham <notting at redhat.com>
Date:   Fri Oct 14 17:35:50 2011 -0400

    Fix glade usage by promoting symbol visibility on module open

 gnucash-2.4.7-never-unload.patch |   22 +++++++++++++++++++---
 gnucash.spec                     |    5 ++++-
 2 files changed, 23 insertions(+), 4 deletions(-)
---
diff --git a/gnucash-2.4.7-never-unload.patch b/gnucash-2.4.7-never-unload.patch
index 46c717c..d77553d 100644
--- a/gnucash-2.4.7-never-unload.patch
+++ b/gnucash-2.4.7-never-unload.patch
@@ -1,6 +1,14 @@
-diff -up gnucash-2.4.7/src/gnc-module/gnc-module.c.never gnucash-2.4.7/src/gnc-module/gnc-module.c
---- gnucash-2.4.7/src/gnc-module/gnc-module.c.never	2011-10-11 11:47:40.706200237 -0400
-+++ gnucash-2.4.7/src/gnc-module/gnc-module.c	2011-10-11 11:48:21.254201370 -0400
+diff -up gnucash-2.4.7/src/gnc-module/gnc-module.c.foo gnucash-2.4.7/src/gnc-module/gnc-module.c
+--- gnucash-2.4.7/src/gnc-module/gnc-module.c.foo	2011-10-14 16:19:52.296521997 -0400
++++ gnucash-2.4.7/src/gnc-module/gnc-module.c	2011-10-14 16:19:56.893522125 -0400
+@@ -5,6 +5,7 @@
+ 
+ #include "config.h"
+ 
++#include <dlfcn.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
 @@ -323,7 +323,7 @@ gnc_module_get_info(const char * fullpat
      info->module_age         = *(int *)age;
      info->module_revision    = *(int *)revision;
@@ -10,3 +18,11 @@ diff -up gnucash-2.4.7/src/gnc-module/gnc-module.c.never gnucash-2.4.7/src/gnc-m
  get_info_close:
      /*   g_debug("(init) closing '%s'\n", fullpath); */
      g_module_close(gmodule);
+@@ -513,6 +513,7 @@ gnc_module_load_common(const char * modu
+             info->load_count = 1;
+             info->init_func  = initfunc;
+             g_hash_table_insert(loaded_modules, info, info);
++            dlopen(modinfo->module_filepath, RTLD_LAZY|RTLD_GLOBAL|RTLD_NOLOAD);
+ 
+             /* now call its init function.  this should load any dependent
+              * modules, too.  If it doesn't return TRUE unload the module. */
diff --git a/gnucash.spec b/gnucash.spec
index a56058b..7b580df 100644
--- a/gnucash.spec
+++ b/gnucash.spec
@@ -4,7 +4,7 @@ Name: gnucash
 Summary: Finance management application
 Version: 2.4.7
 URL: http://gnucash.org/
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv2+
 Group: Applications/Productivity
 Source: http://www.gnucash.org/pub/gnucash/sources/unstable/2.3.x/gnucash-%{version}.tar.bz2
@@ -166,6 +166,9 @@ fi
 %doc doc/README.german doc/README.francais doc/README.OFX doc/README.HBCI
 
 %changelog
+* Fri Oct 14 2011 Bill Nottingham <notting at redhat.com> - 2.4.7-4
+- update the last fix (#703249, #742202, #744310)
+
 * Tue Oct 11 2011 Bill Nottingham <notting at redhat.com> - 2.4.7-3
 - when scanning modules, don't unload them (#703249, #742202, #744310)
 


More information about the scm-commits mailing list