phosphor-power: Fix pkg_postinst script

The pkg_postinst script uses the variable OBMC_POWER_SUPPLY_INSTANCES
that is not availabe during the post installation. This results in the
links of power-supply-monitor@.service are not created.

Use `@d.getVar()` to get the variable from bitbake fixed the issue.

Also removes the default OBMC_POWER_SUPPLY_INSTANCES, let the build fail
when OBMC_POWER_SUPPLY_INSTANCES is not defined. Otherwise such issues
are only found at runtime.

Tested: Verify the witherspoon build contains the
        power-supply-monitor@.service links;
        Unset OBMC_POWER_SUPPLY_INSTANCES, verify the build fails due to
        installation failure.

Change-Id: I988dca7cb0002128ec9cbe853c2833c0754431c7
Signed-off-by: Lei YU <mine260309@gmail.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
1 file changed
tree: 45bcfb5522cad861ac5a88c858ec1698cb2f33ab
  1. aspeed-layer/
  2. classes/
  3. conf/
  4. nuvoton-layer/
  5. raspberrypi/
  6. recipes-connectivity/
  7. recipes-core/
  8. recipes-devtools/
  9. recipes-extended/
  10. recipes-graphics/
  11. recipes-phosphor/
  12. recipes-protocols/
  13. recipes-support/
  14. recipes-textproc/
  15. recipes-x86/
  16. COPYING.apache-2.0
  17. COPYING.MIT
  18. LICENSE
  19. MAINTAINERS
  20. README.md
  21. recipes.txt
README.md

OpenBMC

meta-phosphor is the OpenBMC layer. This layer should be included for all OpenBMC systems. The OpenBMC layer contains content which is shared between all OpenBMC systems.