From b03d0cacaff4b4fa5fa58d4b568c20604b6ac780 Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Thu, 11 Oct 2018 19:42:58 -0700 Subject: meta-phosphor: settings-manager: rename as git Rename phosphor-settings-manager.bb to phosphor-settings-manager_git.bb per OE norms. (From meta-phosphor rev: 4fce35f58137208209adbc46e78be74178dfd517) Change-Id: I9d6da2a5c0384da105a32ed484ae7eda49455652 Signed-off-by: Patrick Venture Signed-off-by: Brad Bishop --- .../settings/phosphor-settings-manager.bb | 67 ---------------------- .../settings/phosphor-settings-manager_git.bb | 67 ++++++++++++++++++++++ 2 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager.bb create mode 100644 meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb diff --git a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager.bb b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager.bb deleted file mode 100644 index a63a1f24a..000000000 --- a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager.bb +++ /dev/null @@ -1,67 +0,0 @@ -SUMMARY = "Phosphor Settings Manager" -DESCRIPTION = "Phosphor Settings Manager is an application that creates \ -d-bus objects to represent various user settings." -PR = "r1" - -inherit autotools -inherit obmc-phosphor-dbus-service -inherit pythonnative -inherit phosphor-settings-manager - -require phosphor-settings-manager.inc - -DBUS_SERVICE_${PN} = "xyz.openbmc_project.Settings.service" - -DEPENDS += "python-pyyaml-native" -DEPENDS += "python-mako-native" -DEPENDS += "autoconf-archive-native" -DEPENDS += "virtual/phosphor-settings-defaults" -DEPENDS += "${@df_enabled(d, 'obmc-mrw', 'phosphor-settings-read-settings-mrw-native')}" -DEPENDS += "sdbusplus sdbusplus-native" -DEPENDS += "phosphor-dbus-interfaces phosphor-dbus-interfaces-native" -DEPENDS += "phosphor-logging" -DEPENDS += "cereal" - -RDEPENDS_${PN} += "sdbusplus phosphor-dbus-interfaces" - -S = "${WORKDIR}/git" -SRC_URI += "file://merge_settings.py" - -EXTRA_OECONF = " \ - SETTINGS_YAML=${STAGING_DIR_NATIVE}${settings_datadir}/defaults.yaml \ - " - -# Collect files in SRC_URI that end in ".override.yml" and call a script that -# writes their contents over that of settings.yaml, which is then updated to -# the merged data values. -# This doesn't correctly handle globs in ".override.yml" entries in SRC_URI. -python do_merge_settings () { - import subprocess - - # TODO: Perform the merge in a temporary directory? - workdir = d.getVar('WORKDIR', True) - nativedir = d.getVar('STAGING_DIR_NATIVE', True) - settingsdir = d.getVar('settings_datadir', True) - settingsdir = settingsdir[1:] - settingsdir = os.path.join(nativedir, settingsdir) - cmd = [] - cmd.append(os.path.join(workdir, 'merge_settings.py')) - cmd.append(os.path.join(settingsdir, 'defaults.yaml')) - # Used for any settings from the MRW - use_mrw = df_enabled(d, 'obmc-mrw', 'true') - if (use_mrw == 'true'): - cmd.append(os.path.join(settingsdir, 'mrw-settings.override.yaml')) - - fetch = bb.fetch2.Fetch([], d) - override_urls = [url for url in fetch.urls if url.endswith('.override.yml')] - for url in override_urls: - bb.debug(2, 'Overriding with source: ' + url) - local_base = os.path.basename(fetch.localpath(url)) - filename = os.path.join(workdir, local_base) - cmd.append(filename) - - # Invoke the script and don't catch any resulting exception. - subprocess.check_call(cmd) -} -# python-pyyaml-native is installed by do_configure, so put this task after -addtask merge_settings after do_configure before do_compile diff --git a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb new file mode 100644 index 000000000..a63a1f24a --- /dev/null +++ b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb @@ -0,0 +1,67 @@ +SUMMARY = "Phosphor Settings Manager" +DESCRIPTION = "Phosphor Settings Manager is an application that creates \ +d-bus objects to represent various user settings." +PR = "r1" + +inherit autotools +inherit obmc-phosphor-dbus-service +inherit pythonnative +inherit phosphor-settings-manager + +require phosphor-settings-manager.inc + +DBUS_SERVICE_${PN} = "xyz.openbmc_project.Settings.service" + +DEPENDS += "python-pyyaml-native" +DEPENDS += "python-mako-native" +DEPENDS += "autoconf-archive-native" +DEPENDS += "virtual/phosphor-settings-defaults" +DEPENDS += "${@df_enabled(d, 'obmc-mrw', 'phosphor-settings-read-settings-mrw-native')}" +DEPENDS += "sdbusplus sdbusplus-native" +DEPENDS += "phosphor-dbus-interfaces phosphor-dbus-interfaces-native" +DEPENDS += "phosphor-logging" +DEPENDS += "cereal" + +RDEPENDS_${PN} += "sdbusplus phosphor-dbus-interfaces" + +S = "${WORKDIR}/git" +SRC_URI += "file://merge_settings.py" + +EXTRA_OECONF = " \ + SETTINGS_YAML=${STAGING_DIR_NATIVE}${settings_datadir}/defaults.yaml \ + " + +# Collect files in SRC_URI that end in ".override.yml" and call a script that +# writes their contents over that of settings.yaml, which is then updated to +# the merged data values. +# This doesn't correctly handle globs in ".override.yml" entries in SRC_URI. +python do_merge_settings () { + import subprocess + + # TODO: Perform the merge in a temporary directory? + workdir = d.getVar('WORKDIR', True) + nativedir = d.getVar('STAGING_DIR_NATIVE', True) + settingsdir = d.getVar('settings_datadir', True) + settingsdir = settingsdir[1:] + settingsdir = os.path.join(nativedir, settingsdir) + cmd = [] + cmd.append(os.path.join(workdir, 'merge_settings.py')) + cmd.append(os.path.join(settingsdir, 'defaults.yaml')) + # Used for any settings from the MRW + use_mrw = df_enabled(d, 'obmc-mrw', 'true') + if (use_mrw == 'true'): + cmd.append(os.path.join(settingsdir, 'mrw-settings.override.yaml')) + + fetch = bb.fetch2.Fetch([], d) + override_urls = [url for url in fetch.urls if url.endswith('.override.yml')] + for url in override_urls: + bb.debug(2, 'Overriding with source: ' + url) + local_base = os.path.basename(fetch.localpath(url)) + filename = os.path.join(workdir, local_base) + cmd.append(filename) + + # Invoke the script and don't catch any resulting exception. + subprocess.check_call(cmd) +} +# python-pyyaml-native is installed by do_configure, so put this task after +addtask merge_settings after do_configure before do_compile -- cgit v1.2.3