[11:13] <hakermania> Hello. I have a question about the inclusion of a package in the repos. I am the packager of Wallch and I want to include the latest version of it in Ubuntu 14.04.'s repos. The thing is that we are adding multi desktop-environment support. This means that different code will be compiled for different desktop environments. Should X different packages get into the repos, where X is the number of the supported DEs?
[14:11] <xnox> hakermania: or just make it runtime detection. e.g. plenty of software out there can detect and use unity shortcuts (if available), gnome3 headerbar (if available), normal menubar on most DEs etc.
[14:12] <xnox> hakermania: and it's best to upload via Debian
[14:33] <hakermania> xnox, I've already uploaded Wallch into the repos twice, so I don't think that uploading via Debian is the best choice for now. I know that the detection can be done during runtime and that would be the best choice, but I will have to have the dependencies for all the DEs into one binary, which is not ideal
[14:33] <hakermania> What do you think?
[14:33] <hakermania> into one binary / into one binary package
[14:34] <xnox> you don't have to declare all dependenices.
[14:34] <xnox> they can be recommends.
[14:34] <xnox> and e.g. for unity most of the things are over dbus
[14:34] <xnox> and for gnome it's stock gtk so you already have them.
[14:34] <xnox> the only cases were it's acceptable to split apps is for Qt vs Gtk+
[14:35] <xnox> everything else is acceptable.
[14:35] <xnox> each binary package adds a cost is size, mirroring, package lists length that gets downloaded on _all_ machines not just people who use your app.
[14:36] <xnox> so tell me how the dependencies are different to warrant new binary packages?
[14:36] <xnox> surely detection is done is a way to not cause getting dependencies.
[14:51] <hakermania> xnox, I am trying to solve this problem but I don't get how to do runtime detection and not have all the dependencies as well. Your code must contain e.g. code that needs libunity. How can this code run if libunity is not installed ?
[14:52] <xnox> hakermania: you can, e.g. dlopen(), but there is no reason to not link against libunity9, it's a small enough library
[14:55] <xnox> hakermania: and many people will have it installed already anyway.
[14:56] <xnox> hakermania: and i'm pretty sure one can interract with unity launcher without libunity9
[14:56] <hakermania> xnox, I also depend on gio-2.0 for gsettings function - which is gnome specific
[14:57] <xnox> gsettings are usable from any DE
[14:57] <xnox> if you have qt/kde frontend and gtk one, sure split it into two packages.
[14:58] <xnox> but it does not make sence to split: unity, kubuntu, gnome, gnome3, xfce, lxde, monad, etc.
[14:58] <xnox> see for example transmission: it has curses, qt and gtk frontends.
[14:58] <xnox> but it does share common settings on the backend.
[14:58] <xnox> hakermania: can you actually show your app?
[14:58] <hakermania> xnox, What I mean is that in GNOME i use gio/gio.h which will be a global dependency while it is usable only in GNOME like libunity is usable only in Unity
[14:58] <xnox> gseetings is not gnome specific, it's actually multi-platform.
[14:59] <hakermania> and in transmission is about frontend, not backend
[14:59] <hakermania> The application is Wallch, wait a bit for link
[14:59] <xnox> gio is usable on windows/macosx/linux regardless of the DE
[14:59] <hakermania> http://melloristudio.com/ourprojects/wallch
[14:59] <xnox>  + gio has no visual affect.
[14:59] <hakermania> xnox, thanks for the info, I was not aware of it.
[14:59] <xnox> and all DEs have gio in ubuntu.
[15:00] <hakermania> xnox, I am not targetting only Ubuntu.
[15:00] <xnox> sure.
[15:01] <hakermania> xnox, So, you recommend leaving libunity-dev a dependency as is and doing a runtime check for the DE where I will change in every different DE the desktop background using gsettings
[15:01] <hakermania> Is this truly applicable?
[15:01] <xnox> i'm confused why you are using libunity though.
[15:01] <xnox> on unity, desktop wallpapers are changed by changing gsettings keys.....
[15:01] <hakermania> xnox, for unity support. Unity launcher progressbar + shortcuts
[15:02] <hakermania> xnox, I know that.
[15:02] <hakermania> I have to go for now, sorry.
[15:02] <hakermania> I will login later
[17:40] <hakermania> xnox, Hello again. I want to sum it up a little bit. I want to make Wallch available in multiple different desktop environments. I am using DE-specific libraries for Gnome and Unity (like gio.h and unity.h) but in the other DEs I am planning into launching external commands for changing the background. If gsettings is able to change the background everywhere, then I will totally go with it and libunity indeed is small and thus there is not
[17:40] <hakermania>  a dependency problem. I will do a runtime check for the DE and run the appropriate code each time. The thing is, can gsettings be used in every DE? I haven't heard that again.
[22:35] <xnox> hakermania: instead of unity.h, you can use dbus calls (see wiki page)
[22:35] <xnox> and dbus is universally dependant.
[22:35] <xnox> if a DE is using gsettings then yeah...
[22:37] <hakermania> xnox, Indeed. But the code is ready and it already uses libunity. Either way libunity is a very small package and shouldn't be bothering anyone. The thing that bothers me more is the gio dependency which will be uneeded in the DEs that don't use gsettings. As far as I know many DEs don't use it. I am not sure where you were referring to when talking about all these DEs that use it.
[22:37] <xnox> hakermania: it should be possible, e.g. here is an example from ubiquity-dm that executes stuff for xfce, gnome, unity, lxc, xcfe conditionally, if available/installed. http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/ubiquity/saucy/view/head:/bin/ubiquity-dm#L392
[22:38] <xnox> (sure it's python, but still if you are forking exec() and check if things are available you don't gain mandatory dependencies.
[22:38] <hakermania> xnox, Of course. That's what I am indented to do. As you can see, it calls external processes.
[22:38] <hakermania> It doesn't call gsettings functions
[22:38] <xnox> hakermania: right. so about gio.
[22:38] <xnox> linking against libgtk / libglib is absolutely ok (that's where gio is provided)
[22:39] <xnox> you are correct that it might be dead-code, under some environments. So it's a good thing to make a compile-time option, for those who need/want a slim down version.
[22:39] <xnox> in debian/ubuntu however, the default policy is to enable all compile time options possible
[22:39] <xnox> such that a single (abeit larger) binary can be executed under any DEs.
[22:40] <xnox> so yeah, i believe gsettings will work on gnome3, gnome-classic & unity.
[22:40] <xnox> but e.g. you'll need something else / additional code for xfce etc.
[22:41] <xnox> hakermania: as long as your code gracefully handles all conditions and failures you should be fine.
[23:55] <hakermania> xnox, thanks a lot for helping out :)