summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/matchbox-sato
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-04-22 13:43:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-22 15:33:00 +0100
commit90ca53cbbdb1ed30883d4aa8ce9c933ae1fad5fa (patch)
tree55e82fd5eec203a46dc3de262b6273b68ac6f6ae /meta/recipes-sato/matchbox-sato
parent2b9db2c81bf55527ba3a44fbf94762e5009642a4 (diff)
downloadopenembedded-core-contrib-90ca53cbbdb1ed30883d4aa8ce9c933ae1fad5fa.tar.gz
matchbox-session-sato: install GConf values directly instead of using schemas
Because both matchbox-session-sato and settings-daemon were attempting to install their preferred values though schemas there was a race as to which ones were used. Revert matchbox-session-sato back to writing the values directly, adding a dependency on gconf-native so that this can happen on the host. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-sato/matchbox-sato')
-rw-r--r--meta/recipes-sato/matchbox-sato/matchbox-session-sato/matchbox-session-sato.schemas53
-rw-r--r--meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb21
2 files changed, 13 insertions, 61 deletions
diff --git a/meta/recipes-sato/matchbox-sato/matchbox-session-sato/matchbox-session-sato.schemas b/meta/recipes-sato/matchbox-sato/matchbox-session-sato/matchbox-session-sato.schemas
deleted file mode 100644
index f5b770b62f..0000000000
--- a/meta/recipes-sato/matchbox-sato/matchbox-session-sato/matchbox-session-sato.schemas
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-<gconfschemafile>
-<schemalist>
-
- <schema>
- <key>/schemas/desktop/poky/interface/theme</key>
- <applyto>/desktop/poky/interface/theme</applyto>
- <type>string</type>
- <owner>matchbox-session-sato</owner>
- <default>Sato</default>
- <locale name="C">
- <short>Desktop theme</short>
- <long>The theme name for Matchbox and Sato to use.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/poky/interface/icon_theme</key>
- <applyto>/desktop/poky/interface/icon_theme</applyto>
- <type>string</type>
- <owner>matchbox-session-sato</owner>
- <default>Sato</default>
- <locale name="C">
- <short>Desktop icon theme</short>
- <long>The icon theme name for Matchbox and Sato.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/poky/interface/touchscreen</key>
- <applyto>/desktop/poky/interface/touchscreen</applyto>
- <type>bool</type>
- <owner>matchbox-session-sato</owner>
- <default>true</default>
- <locale name="C">
- <short>Activate touchscreen</short>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/poky/interface/font_name</key>
- <applyto>/desktop/poky/interface/font_name</applyto>
- <type>string</type>
- <owner>matchbox-session-sato</owner>
- <default>Sans 9</default>
- <locale name="C">
- <short>Font name</short>
- </locale>
- </schema>
-
-</schemalist>
-</gconfschemafile>
-
diff --git a/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb b/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
index 70cf7a90d5..2d18c66f18 100644
--- a/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
+++ b/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
@@ -6,16 +6,15 @@ LICENSE = "GPLv2.0+"
LIC_FILES_CHKSUM = "file://session;endline=3;md5=f8a5c5b9c279e52dc094d10e11c2be63"
SECTION = "x11"
-RDEPENDS_${PN} = "formfactor gtk-sato-engine matchbox-theme-sato gtk-theme-sato matchbox-panel-2 matchbox-desktop-sato matchbox-session"
+DEPENDS = "gconf-native"
+RDEPENDS_${PN} = "formfactor gtk-sato-engine matchbox-theme-sato gtk-theme-sato matchbox-panel-2 matchbox-desktop-sato matchbox-session gconf"
PR = "r30"
# This package is architecture specific because the session script is modified
# based on the machine architecture.
PACKAGE_ARCH = "${MACHINE_ARCH}"
-SRC_URI = "file://session \
- file://matchbox-session-sato.schemas \
- "
+SRC_URI = "file://session"
S = "${WORKDIR}"
do_install() {
@@ -33,9 +32,15 @@ do_install() {
install -d ${D}/${sysconfdir}/matchbox
sed -f "$SCRIPT" ${S}/session > ${D}/${sysconfdir}/matchbox/session
chmod +x ${D}/${sysconfdir}/matchbox/session
-
- install -d ${D}/${sysconfdir}/gconf/schemas
- install -m 664 ${S}/matchbox-session-sato.schemas ${D}/${sysconfdir}/gconf/schemas
}
-inherit gconf
+pkg_postinst_${PN} () {
+ set_value() {
+ #type, name, value
+ gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type $1 --set /desktop/poky/interface/$2 "$3"
+ }
+ set_value string theme Sato
+ set_value string icon_theme Sato
+ set_value bool touchscreen true
+ set_value string font_name "Sans 9"
+}
can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import logging import os import sys import argparse import signal bindir = os.path.dirname(__file__) topdir = os.path.dirname(bindir) sys.path[0:0] = [os.path.join(topdir, 'lib')] import bb.tinfoil import bb.msg logger = bb.msg.logger_create('bitbake-layers', sys.stdout) def main(): signal.signal(signal.SIGPIPE, signal.SIG_DFL) parser = argparse.ArgumentParser( description="BitBake layers utility", epilog="Use %(prog)s <subcommand> --help to get help on a specific command", add_help=False) parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') parser.add_argument('-F', '--force', help='Force add without recipe parse verification', action='store_true') parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') global_args, unparsed_args = parser.parse_known_args() # Help is added here rather than via add_help=True, as we don't want it to # be handled by parse_known_args() parser.add_argument('-h', '--help', action='help', default=argparse.SUPPRESS, help='show this help message and exit') subparsers = parser.add_subparsers(title='subcommands', metavar='<subcommand>') subparsers.required = True if global_args.debug: logger.setLevel(logging.DEBUG) elif global_args.quiet: logger.setLevel(logging.ERROR) # Need to re-run logger_create with color argument # (will be the same logger since it has the same name) bb.msg.logger_create('bitbake-layers', output=sys.stdout, color=global_args.color) plugins = [] tinfoil = bb.tinfoil.Tinfoil(tracking=True) tinfoil.logger.setLevel(logger.getEffectiveLevel()) try: tinfoil.prepare(True) for path in ([topdir] + tinfoil.config_data.getVar('BBPATH').split(':')): pluginpath = os.path.join(path, 'lib', 'bblayers') bb.utils.load_plugins(logger, plugins, pluginpath) registered = False for plugin in plugins: if hasattr(plugin, 'register_commands'): registered = True plugin.register_commands(subparsers) if hasattr(plugin, 'tinfoil_init'): plugin.tinfoil_init(tinfoil) if not registered: logger.error("No commands registered - missing plugins?") sys.exit(1) args = parser.parse_args(unparsed_args, namespace=global_args) if getattr(args, 'parserecipes', False): tinfoil.config_data.disableTracking() tinfoil.parseRecipes() tinfoil.config_data.enableTracking() return args.func(args) finally: tinfoil.shutdown() if __name__ == "__main__": try: ret = main() except bb.BBHandledException: ret = 1 except Exception: ret = 1 import traceback traceback.print_exc() sys.exit(ret)