image_manager: Check if tmp dir exists before remove

There was an error seen where the version manager core dumped when
it tried to remove the temporary directory after a manifest failure:

phosphor-version-software-manager[1264]: Error No manifest file
phosphor-version-software-manager[1264]: terminate called after throwing an
    instance of 'std::experimental::filesystem::v1::__cxx11::filesystem_error'
phosphor-version-software-manager[1264]:   what():  filesystem error: cannot
    remove all: No such file or directory [/tmp/images/imageKcwJFc]

To prevent the core dump, check that the directory exists before trying
to remove it. Create a journal error entry to aid debug since path should
exist.

Change-Id: Ifb47f9a44aa8835c8b7416c7e1a0e67c664d6160
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
1 file changed
tree: d5d699079a4d12dedb1219f26e39b201475744a6
  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`.