Bug#980396: inkscape: most icons missing until librsvg2-common installed

Simon McVittie smcv at debian.org
Tue Jan 19 09:24:00 GMT 2021


Control: retitle -1 inkscape: most icons missing until librsvg2-common installed

On Tue, 19 Jan 2021 at 02:31:10 +0100, Mattia Rizzolo wrote:
> On Mon, Jan 18, 2021 at 01:29:03PM -0500, Jason Woofenden wrote:
> > my uneducated guess is that maybe this bit is what fixed it:
> > 
> >     Processing triggers for libgdk-pixbuf-2.0-0:amd64 (2.42.2+dfsg-1) ...

That was a plausible theory. gdk-pixbuf won't work (doesn't know what
loaders there are on the system) until gdk-pixbuf-query-loaders has been
run, which is what that trigger does.

However...

> Now, what I *really* wonder abuot is why the trigger (or, well, the code
> behind it) is not running by itself on after libgdk-pixbuf-2.0-0.

It ... does? Take a look at
/var/lib/dpkg/info/libgdk-pixbuf-2.0-0:amd64.postinst (or whatever
architecture you're using). You'll see that it does the same thing when
triggered that it does on any upgrade or fresh installation of gdk-pixbuf.
(Of course if you can see any differences or bugs that I'm missing, then
I'm happy to apply patches.)

If that process *failed* the first time and succeeded later, we'd need
to see the dpkg log from the time at which libgdk-pixbuf-2.0-0:amd64
was first installed (or the time it was most recently upgraded, I
suppose). But I don't think this is actually the root cause here.

> Right, so apparently what used to trigger that was librsvg2-common,
> which was pulled in by inkscape through the chain
> 
>     inkscape → libgtk2.0-0 → adwaita-icon-theme | gnome-icon-theme → librsvg2-common

If Inkscape is using GTK (i.e. gdk-pixbuf) to draw its icons, and some
or all of those icons are only provided as SVGs, then librsvg2-common
is required. Without librsvg2-common, gdk-pixbuf does not know anything
about SVG files.

I think the root cause here is that Inkscape does not depend on
librsvg2-common, but needs its functionality if you want an interactive
UI with icons. In Debian 10 and older, it picked up librsvg2-common
from a transitive hard dependency
(libgtk2.0-0 -> adwaita-icon-theme -> librsvg2-common) but in bullseye
that dependency is no longer strict.

librsvg2-common used to be a hard dependency from adwaita-icon-theme,
but was downgraded to a Recommends to make it possible to install GTK
(with severely degraded functionality!) on architectures that do not
have a working Rust compiler - librsvg is now written in Rust, and so
cannot work on ports like m68k that don't have rustc/cargo.

>From the mention of "installing recommended packages and whatnot" in the
original bug report, I assume apt is globally configured to *not* install
Recommends? From the definition of Recommends, this is a configuration
in which you can expect severely reduced functionality - and if you are
doing this in an attempt to get a minimal system, please take a look at
the potential solutions below, and notice that several of them result
in solving your bug report by making this system impossible to achieve.
If people routinely disable all Recommends and then complain about missing
functionality, the only tool we have to fix that (other than wontfix)
is to to upgrade Recommends to Depends, which directly works against
the minimal-system goal that you presumably had.

I think it's reasonable that inkscape has severely reduced functionality
as an interactive app without its direct and indirect Recommends, because
it is also possible to use inkscape noninteractively as a command-line
tool (for example the game-data-packager package does this during its
build). The definition of Recommends is that it lists "packages that
would be found together with this one in all but unusual installations",
and I would count noninteractive use of inkscape as a CLI tool as an
unusual installation.

Possible solutions:

* inkscape Depends: librsvg2-common
  (will become uninstallable on non-Rust architectures)

* inkscape, libgtk2.0-0 and/or libgdk-pixbuf-2.0-0
  Recommends: librsvg2-common
  (minimal installations with no Recommends will be missing icons, but
  users will get a stronger hint to install librsvg2-common)

* inkscape and/or libgtk2.0-0 Depends: librsvg2-common on Rust
  architectures and Recommends: it on non-Rust architectures
  (minimal installations with GTK on mainstream architectures will become
  less minimal)

* libgtk2.0-0 or adwaita-icon-theme Depends: librsvg2-common
  (give up on having a useful desktop system on non-Rust architectures;
  -ports maintainers will complain loudly, with some justification; minimal
  installations will become less minimal)

If the solution we choose involves modifying libgtk2.0-0's dependencies,
we should mirror that change in the libraries that supersede it,
libgtk-3-0 and libgtk-4-1, because all GTK versions have the same
relationship with gdk-pixbuf.

Solutions that are not available:

* libgdk-pixbuf-2.0-0 cannot depend on librsvg2-common because that would
  be a circular dependency

* adwaita-icon-theme cannot have architecture-dependent dependencies
  (for Rust vs. non-Rust architectures) because it is Architecture: all

* In principle -ports maintainers could upload a new librsvg-in-c source
  package based on librsvg 2.40 that provides librsvg on exactly the
  non-Rust architectures, but the GNOME team is not willing to maintain
  that, because librsvg 2.40 is unmaintained upstream and probably has
  security vulnerabilities (the reason it was rewritten in Rust was to
  avoid the attack surface inherent in writing parsers in C)

Do the inkscape maintainers have any thoughts on where the best place is
to add Depends or Recommends?

    smcv



More information about the pkg-gnome-maintainers mailing list