Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New candidate revision (r57) create icons issue #257

Open
seb128 opened this issue Nov 20, 2024 · 12 comments
Open

New candidate revision (r57) create icons issue #257

seb128 opened this issue Nov 20, 2024 · 12 comments
Assignees

Comments

@seb128
Copy link
Contributor

seb128 commented Nov 20, 2024

Testing r57 with the evince candidate the icons in the decoration are missing, see screenshot

evince

Also trying gnome-calculator from candidate

$ /snap/bin/gnome-calculator 
...
(gnome-calculator:22523): Gtk-WARNING **: 09:10:27.684: Failed to load icon /snap/gnome-calculator/965/data-dir/icons/Yaru/scalable/actions/edit-undo-symbolic.svg: Unable to load image-loading module: /snap/gnome-calculator/965/gnome-platform/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /snap/gnome-calculator/965/gnome-platform/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: cannot open shared object file: No such file or directory
@seb128
Copy link
Contributor Author

seb128 commented Nov 20, 2024

In r48
/snap/gnome-46-2404/48/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache has
"/build/gnome-46-2404-sdk/prime/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so"

in r57
/snap/gnome-46-2404/57/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache
"/build/gnome-46-2404-sdk/prime/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader_svg.so"

libpixbufloader-svg.so change to libpixbufloader_svg.so for some reason?

@sergio-costas
Copy link
Contributor

I'll check it.

@sergio-costas
Copy link
Contributor

Mmm... odd... I'll try to rename that file.

@sergio-costas
Copy link
Contributor

Ok, it seems that snaps that use gnome extension do rebuild the gdk-pixbuf-loaders.cache at install or update. The problem is that, when the gnome-XX-XXXX.snap is updated, that cache isn't rebuilt, so any change would break that.

Renaming the loader in the sdk and in the contents snap does work, but the best solution would be to rebuild all those caches (not only the loaders, but also the icons and others) not only when a snap is updated, but also when the extensions on which it depends are updated.

@seb128
Copy link
Contributor Author

seb128 commented Nov 25, 2024

Is that rebuild logic part of the gnome wrapper?

@sergio-costas
Copy link
Contributor

Maybe the best course of action is to check if libpixbufloader-svg.so does exist, and if not, do a soft link from libpixbufloader_svg.so. What do you think?

@sergio-costas
Copy link
Contributor

Yes, it is. IIRC, it is part of the snapcraft-desktop-integration scripts.

@sergio-costas
Copy link
Contributor

@seb128
Copy link
Contributor Author

seb128 commented Nov 25, 2024

So I think we need to update the wrapper logic first. I would suggest we revert the gnome-sdk change at least until the wrapper change is landed and published to stable

@sergio-costas
Copy link
Contributor

Here it uses a md5sum to detect changes in the gtk-common-themes snap. Maybe we could do something like that for gnome? https://github.com/canonical/snapcraft-desktop-integration/blob/80aefcc8acafa2656e666ffa5e905fd91e2999e3/common/init#L46

@sergio-costas
Copy link
Contributor

sergio-costas commented Nov 25, 2024

The point is that I didn't change anything that whould produce that. It seems something in gdk-pixbuf-loaders, or maybe librsvg...

sergio-costas added a commit to sergio-costas/gnome-sdk that referenced this issue Nov 25, 2024
This is required because version 2.59.1 changes the name of the
gdk-pixbuf-loader from libpixbufloader-svg.so to
libpixbufloader_svg.so, which breaks snaps because each snap
stores its own loaders.cache file with the path for each loader,
so an already installed snap will have a loaders.cache file with
a svg loader path pointing to the former name, but the current
file would be the later, thus it won't be able to load any svg.

The right solution is to modify snapcraft-desktop-integration
scripts to add a check that rebuilds any cache (not only pixbuf
loaders, but also fonts, icons...) not only if the snap itself
is updated, but also if any of the extensions is updated too.

Fix ubuntu#257
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants