summaryrefslogtreecommitdiffstats
path: root/meta/classes/gsettings.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/gsettings.bbclass')
-rw-r--r--meta/classes/gsettings.bbclass42
1 files changed, 0 insertions, 42 deletions
diff --git a/meta/classes/gsettings.bbclass b/meta/classes/gsettings.bbclass
deleted file mode 100644
index 33afc96a9c..0000000000
--- a/meta/classes/gsettings.bbclass
+++ /dev/null
@@ -1,42 +0,0 @@
1# A bbclass to handle installed GSettings (glib) schemas, updated the compiled
2# form on package install and remove.
3#
4# The compiled schemas are platform-agnostic, so we can depend on
5# glib-2.0-native for the native tool and run the postinst script when the
6# rootfs builds to save a little time on first boot.
7
8# TODO use a trigger so that this runs once per package operation run
9
10GSETTINGS_PACKAGE ?= "${PN}"
11
12python __anonymous() {
13 pkg = d.getVar("GSETTINGS_PACKAGE")
14 if pkg:
15 d.appendVar("PACKAGE_WRITE_DEPS", " glib-2.0-native")
16 d.appendVar("RDEPENDS_" + pkg, " ${MLPREFIX}glib-2.0-utils")
17 d.appendVar("FILES_" + pkg, " ${datadir}/glib-2.0/schemas")
18}
19
20gsettings_postinstrm () {
21 glib-compile-schemas $D${datadir}/glib-2.0/schemas
22}
23
24python populate_packages_append () {
25 pkg = d.getVar('GSETTINGS_PACKAGE')
26 if pkg:
27 bb.note("adding gsettings postinst scripts to %s" % pkg)
28
29 postinst = d.getVar('pkg_postinst_%s' % pkg) or d.getVar('pkg_postinst')
30 if not postinst:
31 postinst = '#!/bin/sh\n'
32 postinst += d.getVar('gsettings_postinstrm')
33 d.setVar('pkg_postinst_%s' % pkg, postinst)
34
35 bb.note("adding gsettings postrm scripts to %s" % pkg)
36
37 postrm = d.getVar('pkg_postrm_%s' % pkg) or d.getVar('pkg_postrm')
38 if not postrm:
39 postrm = '#!/bin/sh\n'
40 postrm += d.getVar('gsettings_postinstrm')
41 d.setVar('pkg_postrm_%s' % pkg, postrm)
42}