Closed freijon closed 2 years ago
~Mine is also installed there. Try running glib-compile-schemas /usr/share/glib-2.0/schemas
. postinstall.py
should compile it automatically though...~
Edit: Try this branch instead: https://github.com/ErikReider/SwayNotificationCenter/tree/postinstall-fix
Edit: Try this branch instead: https://github.com/ErikReider/SwayNotificationCenter/tree/postinstall-fix
Just gave it a try - during compilation I saw this line:
Running custom install script '/var/tmp/portage/gui-apps/swaync-0.6.3/work/SwayNotificationCenter-0.6.3/build-aux/meson/postinstall.py'
however, after trying to launch swaync
I still get the same error message
What if you manually run glib-compile-schemas /usr/share/glib-2.0/schemas
?
After this command it works
Strange... It does the exact same thing unless the path in the script is incorrect
What's the output of the script if you add print(['glib-compile-schemas', path.join(datadir, 'glib-2.0', 'schemas')])
before the call method?
Unfortunately: nothing... I also don't see Compiling GSettings schemas...
If I add a print before if not destdir:
I also don't see anything in the output, which makes me believe the script is not actually executed.
I played around a bit... Seems the "print" is suppressed somehow... But if I write to a debug file on /tmp I can see the messages.
Turns out everything under if not destdir:
is not executed because destdir = /var/tmp/portage/gui-apps/swaync-0.6.3/image
Seems like that it's standard to skip compiling if destdir is exported. Why would you need that? Wouldn't the regular directory be better?
This is apparently done by portage (package manager of Gentoo). everything is compiled and installed in a sandbox and finally the contents in the 'image' folder are copied to the filesystem
Hmmm... makepkg
does the same thing but that seems to work as expected
Seems like there's a pacman hook for compiling the gsettings. I'll double check this
Edit: That seems to be the case.
Whenever a gschema file in usr/share/glib-2.0/schemas/
gets added/removed, pacman runs /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas
Maybe a stupid question, but how can I undo glib-compile-schemas
? I'd like to revert it and to test how I could fix it.
I'm not sure if this is the preferred method but here:
sudo rm /usr/share/glib-2.0/schemas/org.erikreider.swaync.gschema.xml
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
Thanks!
Your comment about pacman
having a hook for this made me think if there is something similar for Gentoo. And indeed there is:
gnome2_schemas_update Updates GSettings schemas. This function should be called from pkg_postinst and pkg_postrm.
So I added the following to the ebuild:
pkg_postinst() {
gnome2_schemas_update
}
pkg_postrm() {
gnome2_schemas_update
}
and now everything works after a fresh install. The postrm() also takes care to run glib-compile-schemas
after the package is removed.
I think you can close this issue, I will update the Gentoo ebuild accordingly (I'm the maintainer on the GURU repo).
I'm using SwayNotificationCenter on Gentoo and with version 0.6.3 I get the following error when lauching
swaync
:Here are the files installed by the Gentoo package:
What stands out is the
/usr/share/glib-2.0/schemas/org.erikreider.swaync.gschema.xml
file which is installed, but I don't know if the path is correct. Apparently not, otherwise it would read/detect it.What am I missing here?