For a long time, openSUSE has been parsing JavaScript and python script during the packaging process to identifty gobject-introspection based dependencies and translated those into rpm dependencies (see my two previous posts and ).

The GNOME Developers (upstream) were busy improving performance of many of the tools (like gnome-shell) by avoiding the clutter of many small javascript files. This was done by embedding the javascript files as GResources into an ELF binary. Pretty neat, but the gobject-scanner which openSUSE employed no longer detected the dependencies and the ‘traditional’ ELF dependency scanner also does now know what this is about.

The solution: fired up vi, hacked a few lines of shell code together (which, in fact is how the original scanner is mostly implemented, plus a glib based tool). The scanner (gi-find-deps.sh) now not only checks javascript and python files, but also tries to inspect ELF binaries, extracting the GResources if any found and then scanning those resources for eventual dependencies.

The time penalty is acceptable, considering that building is done ‘once’ for all the users and the fact that we get more reliable dependencies is certainly worthy the few extra cycles.

The fixed scanner is on it’s way from DEVEL to GNOME:Next -> GNOME:Factory -> openSUSE:Factory and will finally be in used in the next openSUSE version (13.2).

If you happen to find issues with the new scanner, please drop me a note so that this can be corrected.