< prev index next >
src/jdk.incubator.jpackage/linux/classes/jdk/incubator/jpackage/internal/LinuxRpmBundler.java
Print this page
@@ -23,11 +23,10 @@
* questions.
*/
package jdk.incubator.jpackage.internal;
-import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
@@ -145,24 +144,24 @@
Map<String, ? super Object> params) {
return List.of(createRpmbuildToolValidator());
}
@Override
- protected File buildPackageBundle(
+ protected Path buildPackageBundle(
Map<String, String> replacementData,
- Map<String, ? super Object> params, File outputParentDir) throws
+ Map<String, ? super Object> params, Path outputParentDir) throws
PackagerException, IOException {
Path specFile = specFile(params);
// prepare spec file
createResource(DEFAULT_SPEC_TEMPLATE, params)
.setCategory(I18N.getString("resource.rpm-spec-file"))
.setSubstitutionData(replacementData)
.saveToFile(specFile);
- return buildRPM(params, outputParentDir.toPath()).toFile();
+ return buildRPM(params, outputParentDir);
}
@Override
protected Map<String, String> createReplacementData(
Map<String, ? super Object> params) throws IOException {
@@ -273,11 +272,11 @@
}
return rpmArch;
}
private Path specFile(Map<String, ? super Object> params) {
- return TEMP_ROOT.fetchFrom(params).toPath().resolve(Path.of("SPECS",
+ return TEMP_ROOT.fetchFrom(params).resolve(Path.of("SPECS",
PACKAGE_NAME.fetchFrom(params) + ".spec"));
}
private Path buildRPM(Map<String, ? super Object> params,
Path outdir) throws IOException {
@@ -300,11 +299,11 @@
thePackage.sourceRoot()),
// save result to output dir
"--define", String.format("%%_rpmdir %s", rpmFile.getParent()),
// do not use other system directories to build as current user
"--define", String.format("%%_topdir %s",
- TEMP_ROOT.fetchFrom(params).toPath().toAbsolutePath()),
+ TEMP_ROOT.fetchFrom(params).toAbsolutePath()),
"--define", String.format("%%_rpmfilename %s", rpmFile.getFileName())
).executeExpectSuccess();
Log.verbose(MessageFormat.format(
I18N.getString("message.output-bundle-location"),
< prev index next >