[Gambas-user] Specifications for Gambas 3

Benoît Minisini gambas at ...1...
Sat Oct 26 16:23:41 CEST 2013


Le 25/10/2013 07:56, Kende Krisztián a écrit :
>> Le 23/10/2013 14:15, Kende Krisztián a écrit :
>>> Hi
>>>
>>> I have read the "How To Package Gambas" document
>>> (http://www.gambasdoc.org/help/howto/package?v3#t2) and some things
>>> I do not understand:
>>>
>>> The runtime package contain the gb.gui component, but
>>> gambas3-runtime is not depend from gambas3-gb-gtk or
>>> gambas3-gb-qt4. Gb.gui does not work without them.
>>
>> I guess with "is not depend from", you mean "does not depend on"?
>>
>
> Yes, my English is not the best. Sorry.
>
>> Logically, you are right. 'gb.gui' without 'gb.gtk' OR 'gb.qt4' is
>> not really useful.
>>
>> But actually, you can run then 'gb.gui' component without nothing
>> else. You would get a Gambas error, but not an error of the dynamic
>> loader.
>
> You misunderstand. My gambas3-gb-runtime package doesn't contain the
> gb.gui and gb.gui.opengl components. If I create a Gambas application
> without GUI, not load unnecessary components. But gb.gui component is
> depend from gb.gtk and gb.qt4.

If you don't respect the packaging method described the wiki exactly, 
the IDE packager won't work and is completely useless.

> And if I follow the spec, then I have the opportunity to create a
> gambas application that works on my KDE desktop, but did not work on
> GNOME. Because IDE is use the gb.qt4 component, my app is use gb.gui,
> but gb.gtk doesn't installed.

I understand, but if you app depends on 'gb.gui', it means that it can 
work with 'gb.qt4' or 'gb.gtk' indifferently.

To solve your problem, you must be able to create a 'gb.gui' package 
that either:

1) installs 'gb.qt4' OR 'gb.gtk' depending on the desktop binary 
packages being installed on the system (KDE or razor-qt for 'gb.qt4', 
every other desktop for 'gb.gtk').

2) ask the user if he wants to install 'gb.qt4' OR 'gb.gtk'.

If you can't do that (and I don't know if it possible, on which 
distributions), then you must not make gb.gui depends on gb.qt4 and gb.gtk.

The true solution is 1). It seems that is possible with apt, because I 
think some packages are sometimes installed depending on other packages 
that are not "physically" related at all.

>
>> Remember that the main point of having all these packages is
>> preventing the user from installing something he doesn't need:
>> forcing to install 'gb.gtk' or 'gt.qt4' just because you need the
>> Gambas runtime would carry megabytes of shared libraries!
>>
>
> No, I'm not forcing anyone!
>

If gb.gui depends on all GUI packages, you are forcing them to install them.

>>>
>>> Gambas3-ide package is depend from gambas3-gb-form, but is not from
>>> gambas3-gb-form-stock. Gambas3.gambas is not work without
>>> gb.form.stock component.
>>
>> Actually 'gb.form' can work without 'gb.form.stock', as soon as you
>> don't use the standard built-in icon theme that is located in the
>> gb.form.stock component.
>>
>
> You misunderstand. The IDE not work without gb.form.stock component. So
> if I follow the spec, do not start the gambas3.gambas.

Then this is my fault: the IDE must depend on gb.form.stock. But not 
gb.form!

>
>>>
>>> Gambas3-gb-desktop-gnome package is depend from gambas3-gb-desktop,
>>> but vice versa is not true (in other words, the previous contents
>>> are not part of the latter). If use gb.desktop component on GNOME
>>> desktop, the following error message comes up: Cannot load component
>>> 'gb.desktop.gnome': cannot find component
>>
>> Same logic: actually 'gb.desktop' can run without 'gb.desktop.gnome'.
>> 'gb.desktop.gnome' relies on a gnome desktop component that may carry
>> most part of the Gnome installation if you have a dependency, even if
>> you don't use it.
>>
>> I don't know if you can make an optional dependency that would
>> install only if a specific desktop is in use, and if it is possible
>> in all distributions... If you can, just tell me. Otherwise, you must
>> not create a dependency.
>>
>
> If I create a Gambas application with gb.desktop component on KDE, and
> if I package it, this app maybe doesn't work on GNOME. Are you sure
> that is how it should work?
> I understand, the lib is use some RAM, but it's dependency. The
> gb.desktop component maybe not work without gb.desktop.gnome on other
> desktop.

This is the same problem with 'gb.gui'.

Installing 'gb.desktop' must automatically install 'gb.desktop.gnome' as 
soon as GNOME is detected on the system (or Mate or LXDE).

Is there anyone that can help and explain us how to make a package that 
optionally install another package if some library or package is already 
installed on the system? Is this possible on all package systems (mainly 
for RedHat, Debian and ArchLinux)?

-- 
Benoît Minisini




More information about the User mailing list