Call update u-boot env once when a priority is changed

The recursive nature of calling the free priority function
would trigger setting the u-boot env multiple times.
Make a change so that the priorities are sorted and
updated once.

- Create a non-overriden priority setter function to be called
by the free priority function and by the function that creates
the dbus objects after a bmc reboot. There's no need to call
to free the priorities after reboot since the priorities are
preserved on the bmc, and if they're not they default to 0 or 255.
- When a dbus request is made to update the priority, update
the value, then call the free priority function, which will
sort the versions by priority and bump the priority of any
duplicate ones.

Resolves openbmc/openbmc#2535

Change-Id: Ib92cc0ca6c4d5f6e986f3cde7156d63b53844b46
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
4 files changed
tree: 5d9cfd256e273a5513bbdbd2e89f4eeabd839b2b
  1. org/
  2. test/
  3. xyz/
  4. .gitignore
  5. activation.cpp
  6. activation.hpp
  7. bootstrap.sh
  8. configure.ac
  9. download_manager.cpp
  10. download_manager.hpp
  11. download_manager_main.cpp
  12. elog-errors.hpp
  13. image_manager.cpp
  14. image_manager.hpp
  15. image_manager_main.cpp
  16. item_updater.cpp
  17. item_updater.hpp
  18. item_updater_main.cpp
  19. LICENSE
  20. Makefile.am
  21. README.md
  22. serialize.cpp
  23. serialize.hpp
  24. version.cpp
  25. version.hpp
  26. watch.cpp
  27. watch.hpp
README.md

phosphor-bmc-code-mgmt

Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To full clean the repository again run `./bootstrap.sh clean`.