[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1059940: cinnamon-session: missing dependencies on required typelibs



Package: cinnamon-session
Version: 5.8.1-2
Severity: important
Justification: Policy §3.5, §7.2

On #1059678, Fabio Fantoni wrote:
> I was also wondering about "gi.repository import" of python scripts, present
> in other components, it don't will be the same needs of depends? I mean for
> example https://github.com/linuxmint/cinnamon-session/blob/master/cinnamon-session-quit/cinnamon-session-quit.py

This is off-topic for #1059678, really, so I'm converting it into a
separate bug report.

Yes, if your application does this:

> import gi
> gi.require_version('Gtk', '3.0')
> gi.require_version('XApp', '1.0')
> from gi.repository import GLib, Gio, Gtk, Gdk, XApp

in a required component, then it should have dependencies on
gir1.2-gtk-3.0, gir1.2-xapp-1.0, gir1.2-glib-2.0, gir1.2-gio-2.0 and
gir1.2-gdk-3.0, as well as python3-gi.

(gir1.2-gio-2.0 is a virtual package provided by gir1.2-glib-2.0,
and gir1.2-gdk-3.0 is a virtual package provided by gir1.2-gtk-3.0,
so strictly speaking you don't need to add those two dependencies,
but I think it's clearer and more robust to write them out explicitly
rather than thinking about how to minimize the list.)

If the dependencies are in an unimportant part of the package (like
the plugins in exaile, #1059625), then it would be OK to downgrade
them to Recommends or Suggests, or perhaps even close this bug with no
action. Conversely, if cinnamon-session-quit.py is an important part of
this package, then they should be hard dependencies (and this bug report
should be RC).

More generally, if your application loads FooBar-2.3.typelib, then it
should usually have a dependency on gir1.2-foobar-2.3. The package names
are mechanically derived from the typelib name.

Please see file:///usr/share/doc/gobject-introspection/policy.txt.gz
for more information.

If there are other Cinnamon components that import typelibs via PyGObject
(or cjs or gjs) but don't have a dependency on the required typelib,
then please fix those too.

Thanks,
    smcv


Reply to: