lah7 / gtk3-classic

Patches to bring back a traditional experience for GTK+3
Other
339 stars 24 forks source link

PKGBUILD: Add `adwaita-icon-theme` as hard dependency? #80

Open lah7 opened 2 years ago

lah7 commented 2 years ago

From the AUR comment section:

@HanabishiRecca commented on 2022-08-20 13:59 (UTC)

The package should add adwaita-icon-theme as a dependency (as original gtk3 package does). Some apps crash without icons from it (gimp-devel in my case).

It is currently optional for users to save a bit of space. gtk3 hardcodes this icon theme.

lah7 commented 2 years ago

I'm aware that users like gtk3-classic for slimming some of dependencies that not necessarily required just to run GTK applications. This is the first time I've came across an application (gimp-devel) that needs adwaita-icon-theme or else it crashes.

If the new GTK3 development of GIMP is hardcoding the Adwaita icon theme, then I think gimp-devel should add it as a dependency instead. Or maybe it's a bug in GIMP for not handling the icon fallback properly?

adwaita-icon-theme is already optional, 62f18c9b4c1e90c2441d4d13995206f30559aaab changed this long before I started maintaining this repository. I did take some time to review the differences between gtk3 and gtk3-classic, which I've updated in 4b2e4073b14e29e357cb6132b21256e00548573b and updated the README.

HanabishiRecca commented 2 years ago

This is true, but all packages rely on official gtk3 package and automatically get adwaita-icon-theme as a transitive dependency. Noone will change that because of 3rd party AUR stuff.

And the error message is fairly cryptic, highly likely user will not understand what it wants.

gtk:ERROR:../gtk+-3.24.34/gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Symbolic (gtk-icon-theme-error-quark, 0)
Bail out! Gtk:ERROR:../gtk+-3.24.34/gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Symbolic (gtk-icon-theme-error-quark, 0)
gimp: fatal error: Aborted

Also I think GIMP devs don't even realize that you can have GTK3 without adwaita components.

lah7 commented 2 years ago

I agree. To be most compatible, it would have to put back as a runtime dependency. I'm just cautious that users like gtk3-classic for making Adwaita optional on their non-GNOME desktop, so they might be unhappy with the extra bloat (16 MB).

I suppose it is partly gtk3-classic's fault though, since GTK crashes for returning NULL to that request. Maybe a patch would be needed to fix this edge-case of a bug.

Icon 'image-missing' not present in theme Symbolic

gnome-icon-theme is another candidate that could be used, it's a bit smaller (10 MB) but that one's in the AUR now.

For now, I think I'll wait for more upvotes (👍🏼) and comments on whether this should be added back. I'm not strongly for or against it (I have it installed for the mouse cursor). I just suspect it'll be questioned in future, seeing as it's just one application (still in development) that expects a theme with an icon named image-missing.

fulalas commented 1 year ago

Please, don't do that. GTK+3 doesn't need adwaita-icon-theme to be built nor to run, so if a given third-party application needs it, this is not GTK+3 responsability.

Let's keep it simple :)

HanabishiRecca commented 1 year ago

How you suppose to "run" a library? Libraries exist to be used by apps, fairly obvious fact.

And this logic is flawed from the start. Following it the package can also drop half of the existing dependencies. Because as you said: broken apps is not GTK responsibility, right?

Simple in this case will be to provide maximum coverage, as official gtk3 package does.

fulalas commented 1 year ago

How you suppose to "run" a library? Libraries exist to be used by apps, fairly obvious fact.

Libraries do have runtime dependencies (use ldd to check).

I don't know from where you guys are getting this information that GTK+3 depends on adwaita-icon-theme to be built. I've just checked it now and version 3.24.37 (from 2 weeks ago) doesn't have anything inside the meson.build file saying that. But it wouldn't be a surprise if the GNOME foundation decided to do so, since they did it for evince, their GNOME PDF viewer. This group is known for taking dubious decisions (https://medium.com/@fulalas/gnome-linux-a-complete-disaster-feb27b13a5c2 and https://medium.com/@fulalas/gnome-42-the-nonsense-continues-7d96c3287f7) .

Let's put it simple: if your lib/app doesn't require package X to be built or during runtime, we should never ever make it a hard dependency during build time just because stupid third-party applications don't fix their mess. Understanding application responsibility is very basic in programming.

HanabishiRecca commented 1 year ago

You can share your opinion with Arch maintainers. But now the problem is that gtk3 does have adwaita-icon-theme as a hard dependency. And other packages will not add it explicitly as they are made with the official gtk3 package in mind.

fulalas commented 1 year ago

Thanks, but I'm not an Arch user. I use GTK3 Classic on PorteuX (Slackware based).

BTW, I've just built latest GTK3 (3.24.37) without adwaita-icon-theme and no problems whatsoever. I think Arch is wrong when assuming it requires adwaita-icon-theme. Or maybe they tried to do something like this but in a wrong way: https://github.com/conda-forge/gtk3-feedstock/issues/2

Interesting discussion (although old): https://lists.gnu.org/archive/html/bug-gnu-pspp/2016-02/msg00085.html

HanabishiRecca commented 1 year ago

I'm not an Arch user

Well, this is discussion about AUR package in particular. Does not affect the patchset itself.

I think Arch is wrong when assuming it requires adwaita-icon-theme. Or maybe they tried to do something like this but in a wrong way

I guess there were some reasons to do that earlier in history. Despite GNOME and its applications effectively use GTK4 now, I doubt that saving 5 MB of space will be a significant reason for Arch maintainers to mess with the dependency tree.