After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 678703 - Resolve a relative path in the module file relative to the module file
Resolve a relative path in the module file relative to the module file
Status: RESOLVED OBSOLETE
Product: gdk-pixbuf
Classification: Platform
Component: general
2.24.x
Other All
: Normal enhancement
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2012-06-24 12:28 UTC by Anselm Kruis
Modified: 2018-05-22 13:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Resolve a relative path in the module file relative to the module file (1.16 KB, patch)
2012-06-24 12:28 UTC, Anselm Kruis
needs-work Details | Review

Description Anselm Kruis 2012-06-24 12:28:32 UTC
Created attachment 217112 [details] [review]
Resolve a relative path in the module file relative to the module file

Problem: currently the ".../libpixbufloader-*.so" lines in the module file must be absolute file names. This renders gdk-pixbuf non relocatable.
I use this path to build a fully relocatable application.

The patch changes gdk-pixbuf to resolve a relative path in the module file relative to the module file itself.
Comment 1 Bastien Nocera 2014-10-22 17:14:06 UTC
bug 737523 contains similar patches.
Comment 2 Bastien Nocera 2016-12-19 18:13:01 UTC
Is this still needed now that bug 737523 is fixed?
Comment 3 Anselm Kruis 2017-01-26 09:40:05 UTC
As far as I can see, bug 737523 does not cover relative file names in in the module file. Therefore my patch is still needed.
Comment 4 Bastien Nocera 2017-01-26 13:09:53 UTC
Review of attachment 217112 [details] [review]:

You'd also need to update this patch to the latest version, and make sure to use git to format the patch, so it contains authoring information, and a short explanation of the problem it solves.

::: gdk-pixbuf-2.22.0/gdk-pixbuf/gdk-pixbuf-io.c.orig
@@ +309,3 @@
 }
 
+static void

You can return an allocated string, rather than passing an in/out parameter.

@@ +318,3 @@
+       * of the module file. Because module_file is an absolute path, the result will be 
+       * absolute as well. 
+       */

On the line above.

@@ +319,3 @@
+       * absolute as well. 
+       */
+      gchar *tem = *path;

"tmp"

@@ +322,3 @@
+      gchar *dir = g_path_get_dirname (module_file);
+      *path = g_build_filename (dir, tem, NULL);
+      g_free(dir);

Space before parenthesis.
Comment 5 GNOME Infrastructure Team 2018-05-22 13:13:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues/34.