[Gambas-devel] gambas2-gb-gui dependencies

Benoit Minisini gambas at ...1...
Tue Mar 18 11:20:54 CET 2008


On mardi 18 mars 2008, José Luis Redrejo wrote:
> Hi, I'm about to upload the first applications made in gambas2 to Debian.
> Before doing it I plan to upload version 2.3 and I have a remaining doubt
> with the gb.gui component.
>
> This component has as depedencies gb.gtk or gb.qt, but I don't like that
> dependencies, as the install applications will install the first one in the
> list, no matter if you are a kde or gnome user.
> I.e. if the dependency is gambas2-gb-qt|gambas2-gb-gtk it will always
> install gambas2-gb-qt unless you have already installed gambas2-gb-gtk.
>
> I see four possible scenarios here:
> - A kde user would like to install gb.qt
> - A Gnome user would like to install gb.gtk
> - A both desktops users would like to install gb.gtk & gb.qt
> - Other desktops users would like to install gb.gtk as it's more used in
> other desktops as xfce..
>
> gb.qt dependencies are (in Debian) : libice6 (>= 1:1.0.0), libqt3-mt (>= 3:
> 3.3.8b), libsm6,  libx11-6, libxext6
> gb.gtk dependencies are (iin Debian): libatk1.0-0 (>= 1.20.0),  libcairo2
> (>= 1.4.0),  libglib2.0-0 (>= 2.12.0), libgtk2.0-0 (>= 2.12.0),
> libpango1.0-0 (>= 1.18.4)
>
> The best case would be install gb.gtk & gb.qt, and depending on the desktop
> the application will start the right way, but that would make installing a
> bunch of not-needed qt libraries for Gnome users and a bunch of not-needed
> gtk libraries for Kde users.
>
> I also thought of doing something like:
> gb.gui depends on:
> gambas2-gb-gtk (>= 2.0) | kdeaddon, gambas2-gb-qt | gnome-core,
> gambas2-gb-gtk|gambas2-gb-qt
> So, if you already have installed gnome-core (needed for gnome users) it
> would install gb.gtk, and if you've already installed kdeaddon (needed for
> kde users),  it would install gb.gtk. If you've not installed kdeaddon or
> gnome-core it would install gb.qt. The problem here is that if you're a kde
> & gnome user, it would install only gb.gtk and not gb.qt.
>
> So, I've arrived to a dead-end, and need more ideas and/or help from you.
>
> Regards.
> José L.

As I already told you before, components packages should not have dependencies 
on other components at all (except gambas2-runtime maybe). The dependencies 
are solved by the IDE that writes them inside the '.project' file of the 
project. (I should write that on the "How To Package Gambas" wiki page 
anyway).

This is a solution, but then, Gambas projects that use gb.gui can't 
automatically run, as gb.qt and/or gb.gtk may not have been installed. Note 
that this is the same problem with gb.db, which does not require the 
installation of any gb.db.* database driver.

I don't think there is a real clean solution, as there is no support in 
package managers for the notion of "preferred GUI" that depends on the 
desktop run by the user.

On Mandriva, with their urpmi rpm front-end, sometimes, when I want to install 
a package, it asks me for a choice: "the package you want to install needs 
one of the following packages. Choose one". Isn't it possible on Debian?

-- 
Benoit Minisini




More information about the Devel mailing list