(note, I've since adjusted the snap to not use a layout to avoid this bug).
If I install the snap and run its 'indicator' (ie, a long running process) and then perform a snap refresh of the snapd snap, then the layout is lost. Steps to reproduce:
In a focal desktop VM:
$ snap info snapd # verify using stable
...
tracking: latest/stable
refresh-date: today at 09:29 CDT
channels:
latest/stable: 2.45.2 2020-07-15 (8542) 31MB -
...
$ snap version
snap 2.45.2
snapd 2.45.2
series 16
ubuntu 20.04
kernel 5.4.0-37-generic
$ sudo apt-get install gconf2 # required for the snap to run
$ hamster-jdstrand.indicator
<indicator should now be running with this not returning>
<use indicator to 'Show Overview'. It should work>
In another terminal:
$ sudo snap refresh snapd --edge
$ snap version
snap 2.45.2+git2048.gb2fd998
snapd 2.45.2+git2048.gb2fd998
series 16
ubuntu 20.04
kernel 5.4.0-37-generic
Now go to indicator and do 'Show Overview' and it will fail with with (as seen in the first terminal):
/snap/hamster-jdstrand/x1/usr/lib/python2.7/dist-packages/hamster/configuration.py:156: GtkWarning: IA__gtk_accel_label_set_accel_closure: assertion 'gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed
ui.add_from_file(os.path.join(runtime.data_dir, name))
Traceback (most recent call last):
File "/snap/hamster-jdstrand/x1/bin/hamster-indicator", line 212, in on_overview_show_activated
dialogs.overview.show(self.indicator)
File "/snap/hamster-jdstrand/x1/usr/lib/python2.7/dist-packages/hamster/configuration.py", line 106, in show
dialog = self.get_dialog_class()(parent, **kwargs)
File "/snap/hamster-jdstrand/x1/usr/lib/python2.7/dist-packages/hamster/overview.py", line 50, in __init__
self._gui = load_ui_file("overview.ui")
File "/snap/hamster-jdstrand/x1/usr/lib/python2.7/dist-packages/hamster/configuration.py", line 156, in load_ui_file
ui.add_from_file(os.path.join(runtime.data_dir, name))
glib.GError: Failed to open file '/usr/share/hamster-applet/overview.ui': No such file or directory
Note, /usr/share/hamster-applet/overview.ui is from the layout as specified in the snap.
I have a (private, since it is not ready for consumption) snap that I use personally:
https:/ /git.launchpad. net/~jdstrand/ +git/hamster- jdstrand/ tree/
It uses a layout:
layout: share/hamster- applet: share/hamster- applet
/usr/
bind: $SNAP/usr/
and plugs gtk2 content:
plugs: provider: gtk2-common-themes dir/themes provider: gtk2-common-themes dir/icons provider: gtk-common-themes dir/icons provider: gtk-common-themes
gtk-2-engines:
interface: content
target: $SNAP/lib/gtk-2.0
default-
gtk-2-themes:
interface: content
target: $SNAP/data-
default-
icon-themes:
interface: content
target: $SNAP/data-
default-
sound-themes:
interface: content
target: $SNAP/data-
default-
(note, I've since adjusted the snap to not use a layout to avoid this bug).
If I install the snap and run its 'indicator' (ie, a long running process) and then perform a snap refresh of the snapd snap, then the layout is lost. Steps to reproduce:
In a focal desktop VM:
$ snap info snapd # verify using stable
...
tracking: latest/stable
refresh-date: today at 09:29 CDT
channels:
latest/stable: 2.45.2 2020-07-15 (8542) 31MB -
...
$ snap version
snap 2.45.2
snapd 2.45.2
series 16
ubuntu 20.04
kernel 5.4.0-37-generic
$ sudo apt-get install gconf2 # required for the snap to run
$ wget https:/ /people. canonical. com/~jamie/ zyga/hamster- jdstrand_ 4_amd64. snap
$ sudo snap install --devmode --dangerous ./hamster- jdstrand* snap
$ hamster- jdstrand. indicator
<indicator should now be running with this not returning>
<use indicator to 'Show Overview'. It should work>
In another terminal:
$ sudo snap refresh snapd --edge git2048. gb2fd998 git2048. gb2fd998
$ snap version
snap 2.45.2+
snapd 2.45.2+
series 16
ubuntu 20.04
kernel 5.4.0-37-generic
Now go to indicator and do 'Show Overview' and it will fail with with (as seen in the first terminal):
/snap/hamster- jdstrand/ x1/usr/ lib/python2. 7/dist- packages/ hamster/ configuration. py:156: GtkWarning: IA__gtk_ accel_label_ set_accel_ closure: assertion 'gtk_accel_ group_from_ accel_closure (accel_closure) != NULL' failed from_file( os.path. join(runtime. data_dir, name)) hamster- jdstrand/ x1/bin/ hamster- indicator" , line 212, in on_overview_ show_activated overview. show(self. indicator) hamster- jdstrand/ x1/usr/ lib/python2. 7/dist- packages/ hamster/ configuration. py", line 106, in show dialog_ class() (parent, **kwargs) hamster- jdstrand/ x1/usr/ lib/python2. 7/dist- packages/ hamster/ overview. py", line 50, in __init__ file("overview. ui") hamster- jdstrand/ x1/usr/ lib/python2. 7/dist- packages/ hamster/ configuration. py", line 156, in load_ui_file add_from_ file(os. path.join( runtime. data_dir, name)) hamster- applet/ overview. ui': No such file or directory
ui.add_
Traceback (most recent call last):
File "/snap/
dialogs.
File "/snap/
dialog = self.get_
File "/snap/
self._gui = load_ui_
File "/snap/
ui.
glib.GError: Failed to open file '/usr/share/
Note, /usr/share/ hamster- applet/ overview. ui is from the layout as specified in the snap.