/** * Cleanup the history directories for all recorded rolled back patches. */ protected void cleanupRollbackPatchHistory() { final DirectoryStructure structure = getDirectoryStructure(); for (final String rollback : rollbacks) { if (!IoUtils.recursiveDelete(structure.getBundlesPatchDirectory(rollback))) { failedToCleanupDir(structure.getBundlesPatchDirectory(rollback)); } if (!IoUtils.recursiveDelete(structure.getModulePatchDirectory(rollback))) { failedToCleanupDir(structure.getModulePatchDirectory(rollback)); } } } }
/** * Cleanup the history directories for all recorded rolled back patches. */ protected void cleanupRollbackPatchHistory() { final DirectoryStructure structure = getDirectoryStructure(); for (final String rollback : rollbacks) { if (!IoUtils.recursiveDelete(structure.getBundlesPatchDirectory(rollback))) { failedToCleanupDir(structure.getBundlesPatchDirectory(rollback)); } if (!IoUtils.recursiveDelete(structure.getModulePatchDirectory(rollback))) { failedToCleanupDir(structure.getModulePatchDirectory(rollback)); } } } }
@Override public void completed(IdentityPatchContext context) { final InstalledImage installedImage = directoryStructure.getInstalledImage(); final File history = installedImage.getPatchHistoryDir(patch.getPatchId()); if (!recursiveDelete(history)) { context.failedToCleanupDir(history); } // Cleanup all the recorded rollbacks cleanupEntry(context.getLayers()); cleanupEntry(context.getAddOns()); cleanupEntry(Collections.singleton(context.getIdentityEntry())); }
@Override public void completed(IdentityPatchContext context) { final InstalledImage installedImage = directoryStructure.getInstalledImage(); final File history = installedImage.getPatchHistoryDir(patch.getPatchId()); if (!recursiveDelete(history)) { context.failedToCleanupDir(history); } // Cleanup all the recorded rollbacks cleanupEntry(context.getLayers()); cleanupEntry(context.getAddOns()); cleanupEntry(Collections.singleton(context.getIdentityEntry())); }