return result.createPool();
}
@VisibleForTesting
Software apply(Software software) {
SoftwareBuilder result = software.toBuilder();
// Add all the new packages
for (String pkg : packages) {
result.addPackage(pkg);
}
// Add all the new files
for (FileEntry entry : files) {
result.file(entry.getSource(), entry.getDestination());
}
// Add all the new custom repositories
for (RepositoryEntry entry : repositories) {
result.repository(Repository.builder().name(entry.getId()).key(entry.getKey())
.entries(entry.getEntries()).createRepository());
}
return result.createSoftware();
}