Rebuild only when all the patches are succesfully applied