When Undo() fails 2nd installer or later, the returned result should be
UNDO_ERROR.
Change-Id: I1cda23a4656d710888ed7e1e8372607e9a78d5ee
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
}
if (it != installers_.end() && result == AppInstaller::Result::ERROR) {
do {
- if ((*it)->Undo() != AppInstaller::Result::OK)
+ AppInstaller::Result ret = (*it)->Undo();
+ if (ret != AppInstaller::Result::OK && ret != AppInstaller::Result::ERROR)
result = AppInstaller::Result::UNDO_ERROR;
} while (it-- != installers_.begin());
} else {
--it;
do {
- if ((*it)->Clean() != AppInstaller::Result::OK)
- result = AppInstaller::Result::CLEANUP_ERROR;
+ // Clean operation always succeeds
+ (*it)->Clean();
} while (it-- != installers_.begin());
}