In a constant battle to improve the quality of the packages provided by the openSUSE GNOME Team, we have been working hard on additional automatism in adding Provides and Requires symbols to our packages.
This will make it less common to be able to install a package without the needed libraries.
A common scenario could have been (It was luckily not that common, but was possible to happen):
– The game “lightsoff” was installed. It did not have dependencies on various libraries. rpm was not able to identify any requirements, as the game is written in JavaScript and uses seed as its interpreter. But of course it makes full use of gobject-introspection based bindings of a good part of gnome libraries (GTK, Clutter, GConf, just to name a few).
Now, those libraries all offer a .typelib which is a bindings file, created with object-introspection and we used this knowledge to make dependencies between the packages.
The provides part is rather simple: every .typelib file is one Provides for rpm, the name itself can be split in all needed parts.
The file “Gtk-3.0.typelib” for example represents a “Provides: typelib(Gtk) = 3.0” in the rpm package.
This part has now been pushed to Factory (review pending) and all libraries offering those bindings will hopefully shortly start to advertise this in their rpm metadata..
What needs to be done to achieve this?
If your package contains a .typelib file together with the library (it should be packaged in the shared library package), then you should make sure to add gobject-introspection BuildRequires in your .spec file. This installs the needed hooks for rpm to know how to scan those files and creates the Provides.
What next?
Once we get a full Factory build with those provides, we will evaluate on how much is going to break when we enable the Requires parser as well (it is already enabled in GNOME:Factory, with a bunch of failures for now).
Generally, the checks have been well tested and for all current failures in G:F we know that it is simply missing the build in Factory, as it’s libraries not provided by Gnome (PolKit for example).
So hopefully not too far in the future, we will push the Requires parser as well and not break too much.
One response to “GObject Introspection based typelib Provides and Requires”
[…] long time ago I posted about our inclusion of an automatic dependency generator for typelib() style provides and requires. […]