The code for attaching GSettings for our apps from Apport hooks is rather hacky and duplicated in each hook.
Looks like there's a more proper facility for doing that. Here's what I've found in /usr/lib/python3/dist-packages/apport/packaging_impl.py:
def get_modified_conffiles(self, package):
'''Return modified configuration files of a package.
Return a file name -> file contents map of all configuration files of
package. Please note that apport.hookutils.attach_conffiles() is the
official user-facing API for this, which will ask for confirmation and
allows filtering.
The code for attaching GSettings for our apps from Apport hooks is rather hacky and duplicated in each hook.
Looks like there's a more proper facility for doing that. Here's what I've found in /usr/lib/ python3/ dist-packages/ apport/ packaging_ impl.py:
def get_modified_ conffiles( self, package):
'''Return modified configuration files of a package.
Return a file name -> file contents map of all configuration files of hookutils. attach_ conffiles( ) is the
package. Please note that apport.
official user-facing API for this, which will ask for confirmation and
allows filtering.