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 652639 - Add support for libgda-5.0
Add support for libgda-5.0
Status: RESOLVED FIXED
Product: gtranslator
Classification: Other
Component: Build
2.90.x
Other Linux
: Normal normal
: 2.0
Assigned To: gtranslator-maint
gtranslator-maint
Depends on:
Blocks:
 
 
Reported: 2011-06-15 11:20 UTC by Dominique Leuenberger
Modified: 2012-01-05 15:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to add --with-gda=4.0|5.0 to configure (802 bytes, patch)
2011-06-15 11:20 UTC, Dominique Leuenberger
none Details | Review
2nd try: add --with-gda=4.0|5.0 to configure (3.17 KB, patch)
2011-06-15 11:32 UTC, Dominique Leuenberger
needs-work Details | Review
rd try: add --with-gda=4.0|5.0 to configure. (4.78 KB, patch)
2011-06-15 11:43 UTC, Dominique Leuenberger
accepted-commit_now Details | Review

Description Dominique Leuenberger 2011-06-15 11:20:26 UTC
Created attachment 189970 [details] [review]
Patch to add --with-gda=4.0|5.0 to configure

Libgda 5.0 has been released. It is an API compatible update (not ABI compatible) that can be parallel installed to libgda-4.0.

Supporting it is only a matter of detecting it properly with configure.

The attached patch adds a new parameter --with-gda=4.0|5.0 (default = 4.0 at the moment).

No further modification on the code is needed.
Comment 1 Dominique Leuenberger 2011-06-15 11:25:55 UTC
Ups...a ctualy there is more to fix.

gtreanslator uses gda_execute_non_select_command, which has been deprecated since gda 4.2.3.
Comment 2 Ignacio Casal Quinteiro (nacho) 2011-06-15 11:27:11 UTC
Review of attachment 189970 [details] [review]:

I am fine with this idea although I'd rather an automatic detection instead of making it default to 4.0 and being the user the one that has to set it to 5.0
Comment 3 Dominique Leuenberger 2011-06-15 11:32:25 UTC
Created attachment 189973 [details] [review]
2nd try: add --with-gda=4.0|5.0 to configure

This is a more complete patch:

- add --with-gda=4.0|5.0 to configure
- replace gda_execute_non_select_command with gda_connection_execute_non_select_command
- for this reason, bump libgda-4.0 requirement to 4.2.3.

this makes the build work fine with libgda-4.0 (4.2.3+) and libgda-5.0 (tested with 4.99.1)
Comment 4 Dominique Leuenberger 2011-06-15 11:36:51 UTC
(In reply to comment #2)
> Review of attachment 189970 [details] [review]:
> 
> I am fine with this idea although I'd rather an automatic detection instead of
> making it default to 4.0 and being the user the one that has to set it to 5.0

:) I like how different gnome reviews point in different directions.

I can try to extend the patch to get the 'right thing done' to find what is there.
With the current setup of configure this will be slightly more work, but fine with me.

In this case I'd suggest testing for libgda-5.0, if found use it, otherwise falling back to test for libgda-4.0.

do you agree on this?
Comment 5 Ignacio Casal Quinteiro (nacho) 2011-06-15 11:37:51 UTC
Review of attachment 189973 [details] [review]:

comments inline

::: gtranslator-2.90.5.orig/src/translation-memory/gda/gtr-gda.c
@@ +776,3 @@
                                                     NULL);
 
+  gda_connection_execute_non_select_command (self->priv->db,

fix indentation

@@ +782,3 @@
                                   NULL);
 
+  gda_connection_execute_non_select_command (self->priv->db,

ditto

@@ +789,3 @@
                                   NULL);
 
+  gda_connection_execute_non_select_command (self->priv->db,

ditto

@@ +796,3 @@
                                   NULL);
 
+  gda_connection_execute_non_select_command (self->priv->db,

ditto

@@ +803,3 @@
                                   NULL);
 
+  gda_connection_execute_non_select_command (self->priv->db,

and ditto
Comment 6 Ignacio Casal Quinteiro (nacho) 2011-06-15 11:39:12 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > Review of attachment 189970 [details] [review] [details]:
> > 
> > I am fine with this idea although I'd rather an automatic detection instead of
> > making it default to 4.0 and being the user the one that has to set it to 5.0
> 
> :) I like how different gnome reviews point in different directions.
> 
> I can try to extend the patch to get the 'right thing done' to find what is
> there.
> With the current setup of configure this will be slightly more work, but fine
> with me.
> 
> In this case I'd suggest testing for libgda-5.0, if found use it, otherwise
> falling back to test for libgda-4.0.
> 
> do you agree on this?

thinking better on this don't worry that much, we are going to move this to a plugin anyway. So explicit set is fine by me.
Comment 7 Dominique Leuenberger 2011-06-15 11:43:41 UTC
Created attachment 189976 [details] [review]
rd try: add --with-gda=4.0|5.0 to configure.

Correctly (so I hope) indented the function calls.
Comment 8 Ignacio Casal Quinteiro (nacho) 2011-06-15 11:45:35 UTC
Review of attachment 189976 [details] [review]:

Looks good.
Comment 9 Jordi Mallach 2012-01-05 15:16:56 UTC
Thanks Dominique! I've applied this in 23516385bd647ab46e9ee0d1653262682ea68049, and will transition Debian/Ubuntu to libgda-5.0 RSN.