protected void persist(final String cumulativeID, final List<String> patches, final Properties properties) throws IOException { assert cumulativeID != null; // Create the parent IoUtils.mkdir(structure.getInstallationInfo().getParentFile()); final List<String> consolidate = new ArrayList<String>(); consolidate.addAll(patches); if (!Constants.BASE.equals(cumulativeID)) { consolidate.add(cumulativeID); } if (structure.getModuleRoot() != null) { final File overlays = new File(structure.getModuleRoot(), Constants.OVERLAYS); final File refs = new File(overlays, Constants.OVERLAYS); PatchUtils.writeRefs(refs, consolidate); } // Update the properties properties.put(Constants.CUMULATIVE, cumulativeID); properties.put(Constants.PATCHES, PatchUtils.asString(patches)); if(version != null) { properties.put(Constants.CURRENT_VERSION, version); } // Write layer.conf PatchUtils.writeProperties(structure.getInstallationInfo(), properties); }
protected void persist(final String cumulativeID, final List<String> patches, final Properties properties) throws IOException { assert cumulativeID != null; // Create the parent IoUtils.mkdir(structure.getInstallationInfo().getParentFile()); final List<String> consolidate = new ArrayList<String>(); consolidate.addAll(patches); if (!Constants.BASE.equals(cumulativeID)) { consolidate.add(cumulativeID); } if (structure.getModuleRoot() != null) { final File overlays = new File(structure.getModuleRoot(), Constants.OVERLAYS); final File refs = new File(overlays, Constants.OVERLAYS); PatchUtils.writeRefs(refs, consolidate); } // Update the properties properties.put(Constants.CUMULATIVE, cumulativeID); properties.put(Constants.PATCHES, PatchUtils.asString(patches)); if(version != null) { properties.put(Constants.CURRENT_VERSION, version); } // Write layer.conf PatchUtils.writeProperties(structure.getInstallationInfo(), properties); }