Run oe-stylize on our files
In all of our recipes, we should be following yoctos lead on formatting,
order, and other things, for consistency in our meta layers.
This commit runs oe-stylize.py on all of our files. The types of
changes being made can be seen in the commit, but amount to:
1. Setting an explicit key ordering
2. Sectioning the files appropriately
3. Applying rules checking to our files
At some point in the near future, we would turn this on as part of
repotest, but some minor changes need to be upstreamed to meta-oe (WIP)
to make that happen.
Looking for input on whether this is something we'd like to do, and
whether the diffs below look reasonable to folks.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I489dd21d38a9fe4f3ece89cc7a5e1d0463224abf
diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links-monitor.bb b/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links-monitor.bb
index 01ddecb..b7f4bc8 100644
--- a/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links-monitor.bb
+++ b/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links-monitor.bb
@@ -1,33 +1,27 @@
SUMMARY = "Phosphor Power Monitor services installation"
-PR = "r1"
-
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+PR = "r1"
inherit allarch
RDEPENDS:${PN}-monitor += "phosphor-power-monitor"
-ALLOW_EMPTY:${PN} = "1"
-
-
-pkg_postinst:${PN}() {
- mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
-
- [ -z "${OBMC_POWER_SUPPLY_INSTANCES}" ] && echo "No power supply instance defined" && exit 1
-
- for inst in ${OBMC_POWER_SUPPLY_INSTANCES}; do
- LINK="$D$systemd_system_unitdir/multi-user.target.requires/power-supply-monitor@$inst.service"
- TARGET="../power-supply-monitor@.service"
- ln -s $TARGET $LINK
- done
-}
-
pkg_prerm:${PN}() {
- [ -z "${OBMC_POWER_SUPPLY_INSTANCES}" ] && echo "No power supply instance defined" && exit 1
-
- for inst in ${OBMC_POWER_SUPPLY_INSTANCES}; do
- LINK="$D$systemd_system_unitdir/multi-user.target.requires/power-supply-monitor@$inst.service"
- rm $LINK
- done
+ [ -z "${OBMC_POWER_SUPPLY_INSTANCES}" ] && echo "No power supply instance defined" && exit 1
+ for inst in ${OBMC_POWER_SUPPLY_INSTANCES}; do
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/power-supply-monitor@$inst.service"
+ rm $LINK
+ done
}
+pkg_postinst:${PN}() {
+ mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
+ [ -z "${OBMC_POWER_SUPPLY_INSTANCES}" ] && echo "No power supply instance defined" && exit 1
+ for inst in ${OBMC_POWER_SUPPLY_INSTANCES}; do
+ LINK="$D$systemd_system_unitdir/multi-user.target.requires/power-supply-monitor@$inst.service"
+ TARGET="../power-supply-monitor@.service"
+ ln -s $TARGET $LINK
+ done
+}
+
+ALLOW_EMPTY:${PN} = "1"
diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links-sequencer.bb b/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links-sequencer.bb
index 84ca499..f7863d4 100644
--- a/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links-sequencer.bb
+++ b/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links-sequencer.bb
@@ -1,31 +1,27 @@
SUMMARY = "Phosphor Power Sequencer services installation"
-PR = "r1"
-
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+PR = "r1"
inherit allarch
RDEPENDS:${PN} += "phosphor-power-sequencer"
-ALLOW_EMPTY:${PN} = "1"
-
-pkg_postinst:${PN}() {
- mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants
- mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
-
- LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor.service"
- TARGET="../pseq-monitor.service"
- ln -s $TARGET $LINK
-
- LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor-pgood.service"
- TARGET="../pseq-monitor-pgood.service"
- ln -s $TARGET $LINK
-}
-
pkg_prerm:${PN}() {
- LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor.service"
- rm $LINK
- LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor-pgood.service"
- rm $LINK
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor.service"
+ rm $LINK
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor-pgood.service"
+ rm $LINK
}
+pkg_postinst:${PN}() {
+ mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants
+ mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor.service"
+ TARGET="../pseq-monitor.service"
+ ln -s $TARGET $LINK
+ LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/pseq-monitor-pgood.service"
+ TARGET="../pseq-monitor-pgood.service"
+ ln -s $TARGET $LINK
+}
+
+ALLOW_EMPTY:${PN} = "1"
diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links.bb b/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links.bb
index 4a5cdad..c33e263 100644
--- a/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links.bb
+++ b/meta-phosphor/recipes-phosphor/power/phosphor-power-systemd-links.bb
@@ -1,12 +1,10 @@
# TODO: This is splitted into two recipes;
# To avoid build error, this is kept for now.
# Remove me when the refactor of phosphor-power recipe is finished
-
SUMMARY = "Phosphor Power services installation"
-PR = "r1"
-
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+PR = "r1"
inherit allarch
diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-psu-software-manager_git.bb b/meta-phosphor/recipes-phosphor/power/phosphor-psu-software-manager_git.bb
index 8c171d6..f87f13a 100644
--- a/meta-phosphor/recipes-phosphor/power/phosphor-psu-software-manager_git.bb
+++ b/meta-phosphor/recipes-phosphor/power/phosphor-psu-software-manager_git.bb
@@ -1,45 +1,28 @@
+# The below configs are expected to be overriden by machine layer
+SUMMARY = "Phosphor PSU software manager"
+DESCRIPTION = "Providing PSU firmware version and upgrade"
HOMEPAGE = "https://github.com/openbmc/phosphor-psu-code-mgmt"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
-SRC_URI += "git://github.com/openbmc/phosphor-psu-code-mgmt;branch=master;protocol=https"
-SRCREV = "97092314b107744e290b3fd6cf0eeef43247400c"
-SUMMARY = "Phosphor PSU software manager"
-DESCRIPTION = "Providing PSU firmware version and upgrade"
-
-PR = "r1"
-PV = "1.0+git${SRCPV}"
-
-inherit meson
-inherit pkgconfig
-inherit obmc-phosphor-systemd
-
-S = "${WORKDIR}/git"
-
DEPENDS = " \
phosphor-logging \
phosphor-dbus-interfaces \
sdbusplus \
openssl \
"
+SRCREV = "97092314b107744e290b3fd6cf0eeef43247400c"
+PV = "1.0+git${SRCPV}"
+PR = "r1"
-# The default config of this repo depends on utils from phosphor-power.
-# If your system does not depend on phosphor-power, please use
-# RDEPENDS:${PN}:remove to remove the dependency.
-RDEPENDS:${PN} += "phosphor-power"
+SRC_URI += "git://github.com/openbmc/phosphor-psu-code-mgmt;branch=master;protocol=https"
-# The below configs are expected to be overriden by machine layer
+S = "${WORKDIR}/git"
+SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.Software.Psu.Updater.service"
+SYSTEMD_SERVICE:${PN} += "psu-update@.service"
-## The psutils here comes from phosphor-power repo where
-## * PSU_VERSION_UTIL accepts a PSU inventory path and returns the PSU
-## firmware version string
-## * PSU_VERSION_COMPARE_UTIL accepts several PSU inventory paths and return
-## the newest version string
-PSU_VERSION_UTIL ?= "-DPSU_VERSION_UTIL='/usr/bin/psutils --raw --get-version'"
-PSU_VERSION_COMPARE_UTIL ?= "-DPSU_VERSION_COMPARE_UTIL='/usr/bin/psutils --raw --compare'"
-
-## The psu-update@.service from repo is an example service that only prints a log and fails
-## Override it in a machine layer to invoke the psu update util
-PSU_UPDATE_SERVICE ?= "-DPSU_UPDATE_SERVICE=psu-update@.service"
+inherit meson
+inherit pkgconfig
+inherit obmc-phosphor-systemd
EXTRA_OEMESON = " \
-Dtests=disabled \
@@ -48,5 +31,18 @@
${PSU_UPDATE_SERVICE} \
"
-SYSTEMD_SERVICE:${PN} = "xyz.openbmc_project.Software.Psu.Updater.service"
-SYSTEMD_SERVICE:${PN} += "psu-update@.service"
+# The default config of this repo depends on utils from phosphor-power.
+# If your system does not depend on phosphor-power, please use
+# RDEPENDS:${PN}:remove to remove the dependency.
+RDEPENDS:${PN} += "phosphor-power"
+
+## The psutils here comes from phosphor-power repo where
+## * PSU_VERSION_UTIL accepts a PSU inventory path and returns the PSU
+## firmware version string
+## * PSU_VERSION_COMPARE_UTIL accepts several PSU inventory paths and return
+## the newest version string
+PSU_VERSION_UTIL ?= "-DPSU_VERSION_UTIL='/usr/bin/psutils --raw --get-version'"
+PSU_VERSION_COMPARE_UTIL ?= "-DPSU_VERSION_COMPARE_UTIL='/usr/bin/psutils --raw --compare'"
+## The psu-update@.service from repo is an example service that only prints a log and fails
+## Override it in a machine layer to invoke the psu update util
+PSU_UPDATE_SERVICE ?= "-DPSU_UPDATE_SERVICE=psu-update@.service"