GNOME Bugzilla – Bug 468077
An attempt to remove popt from bonoboui
Last modified: 2008-01-21 09:16:33 UTC
to follow a patch that strips popt from tests/test-moniker.c and samples/container/bonobo-sample-container.c
Created attachment 93920 [details] [review] libbonoboui-HEAD-move-to-goption.patch this should provide same functionnality as with popt. I'm not really sure about the sample since I couldn't find the way it was supposed to work exactly but tests seems to work well.
Thanks, committed. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Gilles, does this mean that we can set the status of libbonoboui at http://live.gnome.org/GnomeGoals/PoptGOption to "done"? :-)
iirc, there is still a structure that depends on popt. I think it wasn't possible to remove it without breaking possibly lots of stuff but I'm not really sure of the impact. Would be better to ask maintainer.
The remaining popt code cannot be removed for API/ABI compatibility reasons.
...and we cannot break API/ABI in a new major release? (i know it is too late now for 2.22, but why shouldn't it be possible for 2.24?)
Interesting question - I had assumed that we exposed popt structures in our public headers; quickly grepping HEAD suggests that isn't so - so then there is the whole issue of expected library dependencies: ie. people not linking to popt because they think they get it from libbonobo - and AFAIR that is a far lesser issue: one we can prolly ignore - and drop the popt dep.
I just took a look at libbonoboui head regarding this popt dependency, even if comment #1 and #2 seem to imply that the dependency has been removed it is still there. Looking at lines 123 i see: static struct poptOption bonobo_ui_gtk_options [] = { { NULL, '\0', POPT_ARG_CALLBACK|POPT_CBFLAG_PRE, &add_gtk_arg_callback, 0, NULL, NULL }, { NULL, '\0', POPT_ARG_INTL_DOMAIN, GETTEXT_PACKAGE, 0, NULL, NULL }, { "gdk-debug", '\0', POPT_ARG_STRING, NULL, 0, N_("Gdk debugging flags to set"), N_("FLAGS")}, { "gdk-no-debug", '\0', POPT_ARG_STRING, NULL, 0, ... ... and ldd libbonobui-2.so | grep popt should that popt is still linked in.
(In reply to comment #8) > I just took a look at libbonoboui head regarding this popt dependency, even if > comment #1 and #2 seem to imply that the dependency has been removed it is > still there. > nobody implied it's a complete fix. I only list 2 out of 3 files that showed popt usage and please reread comment #4 to comment #7 again. You're free to post a patch and/or open a new bug for the remaining changes.
int-eresting ... Of course, that is a compile-time and not a run-time dependency - wrt. the layout of that struct (I guess); but it is a dependency.