item_updater : erase() : remove uploaded images

This method needs to erase both uploaded and active images
to ensure that after either the Delete or DeleteAll methods are
called, all targeted images are removed regardless of activation
status and the necessary space is freed up. Erase should also handle
the deleting of images from the image manager to ensure that--after
deletion--the same image can then be uploaded without receiving the
"image already exists" message.

Tested: Used busctl to call the delete method. Ensured that the
same image can then be uploaded again without reboot. Ensured that
the tmp/images/ directory was empty.

Signed-off-by: Zami Seck <zimzam17@gmail.com>
Change-Id: I3ebec1f4bd9dfcf406afa22f958621ed56eca9b1
2 files changed