item_updater: Skip functional version when freeing space

After the code update, the newly activated version would have a priority
value of 0. If the host is not rebooted, the functional version would
still be the old version but it'd now have a priority value of 1.

If another code update is requested at this point, the function that
frees up space would try to remove the highest priority version which
is the running one.

Add a check to ignore the version if it's the functional one, also
allow a version of priority 0 to be deleted.

Change-Id: I077ea2eeff68e07af533103f292be592326b5111
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
1 file changed
tree: f690e80b126de73b78639c2301ab8c23822785ff
  1. m4/
  2. org/
  3. test/
  4. .gitignore
  5. activation.cpp
  6. activation.hpp
  7. bootstrap.sh
  8. configure.ac
  9. generate-squashfs
  10. generate-ubi
  11. item_updater.cpp
  12. item_updater.hpp
  13. item_updater_main.cpp
  14. LICENSE
  15. Makefile.am
  16. README.md
  17. serialize.cpp
  18. serialize.hpp
  19. version.cpp
  20. version.hpp
  21. watch.cpp
  22. watch.hpp
README.md

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`.