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 697882 - Tracker.gir needs c:prefix
Tracker.gir needs c:prefix
Status: RESOLVED NOTABUG
Product: tracker
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
Depends on: 697759
Blocks:
 
 
Reported: 2013-04-12 14:46 UTC by Colin Walters
Modified: 2013-04-29 08:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-libtracker-sparql-Set-c-prefix-of-our-namespace.patch (1.21 KB, patch)
2013-04-12 21:33 UTC, Colin Walters
none Details | Review

Description Colin Walters 2013-04-12 14:46:48 UTC
+++ This bug was initially created as a clone of Bug #697759 +++

Otherwise when in mixed environments, it can cause the newly optimized gtype lookup to abort searches.  See https://bugzilla.gnome.org/show_bug.cgi?id=696155
Comment 1 Daniel Drake 2013-04-12 15:58:54 UTC
Thanks for tracking this down - I was just about to step in as well.

This is worth doing even for the old lookup code as well, since without c:prefix, gobject-introspection is forced to perform an expensive exhaustive search in all the typelibs.
Comment 2 Colin Walters 2013-04-12 21:32:18 UTC
Nevermind, this is a tracker issue.
Comment 3 Colin Walters 2013-04-12 21:33:00 UTC
Created attachment 241408 [details] [review]
0001-libtracker-sparql-Set-c-prefix-of-our-namespace.patch

This needs to be on tracker-0.16 too please.
Comment 4 Jürg Billeter 2013-04-25 15:00:37 UTC
The difference I see in the gir file when applying the above patch is the following:

--- src/libtracker-sparql/Tracker-0.18.gir-master	2013-04-25 16:54:58.979057575 +0200
+++ src/libtracker-sparql/Tracker-0.18.gir	2013-04-25 16:56:19.161824842 +0200
@@ -6,6 +6,8 @@
 <package name="tracker-sparql-0.18"/>
 <c:include name="libtracker-sparql/tracker-generated-no-checks.h"/>
 <namespace name="Tracker" version="0.18" c:prefix="Tracker">
+	<annotation key="ccode.lower-case-cprefix" value="tracker_"/>
+	<annotation key="ccode.cprefix" value="Tracker"/>
 	<enumeration name="SparqlValueType" c:type="TrackerSparqlValueType" glib:type-name="TrackerSparqlValueType" glib:get-type="tracker_sparql_value_type_get_type">
 		<member name="unbound" c:identifier="TRACKER_SPARQL_VALUE_TYPE_UNBOUND" value="0"/>
 		<member name="uri" c:identifier="TRACKER_SPARQL_VALUE_TYPE_URI" value="1"/>

As far as I can tell, this won't have any effect on g-i tools. Does the patch work for you, am I missing something?
Comment 5 Cosimo Cecchi 2013-04-25 15:23:23 UTC
I confirm the patch fixes the issue for me.
Comment 6 Martyn Russell 2013-04-25 15:49:27 UTC
(In reply to comment #4)
> The difference I see in the gir file when applying the above patch is the
> following:
> 
> --- src/libtracker-sparql/Tracker-0.18.gir-master    2013-04-25
> 16:54:58.979057575 +0200
> +++ src/libtracker-sparql/Tracker-0.18.gir    2013-04-25 16:56:19.161824842
> +0200
> @@ -6,6 +6,8 @@
>  <package name="tracker-sparql-0.18"/>
>  <c:include name="libtracker-sparql/tracker-generated-no-checks.h"/>
>  <namespace name="Tracker" version="0.18" c:prefix="Tracker">
> +    <annotation key="ccode.lower-case-cprefix" value="tracker_"/>
> +    <annotation key="ccode.cprefix" value="Tracker"/>
>      <enumeration name="SparqlValueType" c:type="TrackerSparqlValueType"
> glib:type-name="TrackerSparqlValueType"
> glib:get-type="tracker_sparql_value_type_get_type">
>          <member name="unbound"
> c:identifier="TRACKER_SPARQL_VALUE_TYPE_UNBOUND" value="0"/>
>          <member name="uri" c:identifier="TRACKER_SPARQL_VALUE_TYPE_URI"
> value="1"/>
> 
> As far as I can tell, this won't have any effect on g-i tools. Does the patch
> work for you, am I missing something?

I am just swamped with work right now so I haven't had a chance to test it. I was going to check there are not ABI breaks too between the binaries before/after. I can't see why there should be, but I like to be sure.

Thanks for commenting! :)
Comment 7 Colin Walters 2013-04-25 17:08:47 UTC
We discussed this on IRC, and it turns out tracker simply needed to be rebuilt - in the process of patching it I of course did that, and erroneously thought my patch fixed the issue.
Comment 8 Martyn Russell 2013-04-29 08:13:28 UTC
(In reply to comment #7)
> We discussed this on IRC, and it turns out tracker simply needed to be rebuilt
> - in the process of patching it I of course did that, and erroneously thought
> my patch fixed the issue.

Thank you for following up here Colin. One less thing to do :)