rpms/geany/devel geany-find-sonames.patch, NONE, 1.1 geany.spec, 1.3, 1.4 geany-dynamic-vte.patch, 1.1, NONE
Ralf Corsepius
rc040203 at freenet.de
Thu Jan 25 16:39:04 UTC 2007
On Thu, 2007-01-25 at 11:13 -0500, Josef Whiter wrote:
> Author: josef
>
> Update of /cvs/extras/rpms/geany/devel
> In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29625/devel
> geany-find-sonames.patch:
>
> --- NEW FILE geany-find-sonames.patch ---
> --- geany-orig/src/vte.c.soname 2007-01-25 06:52:12.000000000 -0500
> +++ geany-orig/src/vte.c 2007-01-25 06:52:19.000000000 -0500
> @@ -134,11 +134,14 @@ void vte_init(void)
> }
> else
> {
> - module = g_module_open("libvte.so", G_MODULE_BIND_LAZY);
> - // try to fallback to different versions of libvte.so.x
> - if (module == NULL) module = g_module_open("libvte.so.4", G_MODULE_BIND_LAZY);
> - else if (module == NULL) module = g_module_open("libvte.so.8", G_MODULE_BIND_LAZY);
> - else if (module == NULL) module = g_module_open("libvte.so.9", G_MODULE_BIND_LAZY);
> + gint i;
> + const gchar *sonames[] = { "libvte.so", "libvte.so.4",
> + "libvte.so.8", "libvte.so.9", NULL };
> +
> + for (i = 0; sonames[i] != NULL && module == NULL; i++ )
> + {
> + module = g_module_open(sonames[i], G_MODULE_BIND_LAZY);
> + }
libvte is not a "simple plugin" whose name is libvte.so, but a real
shared library, whose runtime library carries a versioned name:
lib*.so.<number>.
Therefore, IMO, this whole approach geany doesn't make sense.
But even if they really want to explicitly dlopen libvte, then the
search order should start with "most recent version first".
If I were you, I'd kick out all this searching and hard-code the
libvte.so.<version> available in Fedora (Can be easily done via a
define), may-be with a fallback to libvte.so (but I would not do so).
Ralf
More information about the fedora-extras-list
mailing list