src/jdk.packager/linux/classes/jdk/packager/internal/linux/LinuxRpmBundler.java
branchJDK-8200758-branch
changeset 56989 0f19096663d1
parent 56982 e094d5483bd6
child 57015 5d2008115309
--- a/src/jdk.packager/linux/classes/jdk/packager/internal/linux/LinuxRpmBundler.java	Thu Oct 18 18:04:05 2018 -0400
+++ b/src/jdk.packager/linux/classes/jdk/packager/internal/linux/LinuxRpmBundler.java	Thu Oct 18 21:04:15 2018 -0400
@@ -52,7 +52,7 @@
     private static final ResourceBundle I18N = ResourceBundle.getBundle(
             "jdk.packager.internal.resources.linux.LinuxRpmBundler");
 
-    public static final BundlerParamInfo<LinuxAppBundler> APP_BUNDLER = 
+    public static final BundlerParamInfo<LinuxAppBundler> APP_BUNDLER =
             new StandardBundlerParam<>(
             I18N.getString("param.app-bundler.name"),
             I18N.getString("param.app-bundler.description"),
@@ -175,7 +175,7 @@
         try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
                 PrintStream ps = new PrintStream(baos)) {
             ProcessBuilder pb = new ProcessBuilder(toolName, "--version");
-            IOUtils.exec(pb, Log.isDebug(), false, ps); 
+            IOUtils.exec(pb, Log.isDebug(), false, ps);
                     //not interested in the above's output
             String content = new String(baos.toByteArray());
             Pattern pattern = Pattern.compile(" (\\d+\\.\\d+)");
@@ -274,7 +274,7 @@
         }
     }
 
-    private boolean prepareProto(Map<String, ? super Object> p) 
+    private boolean prepareProto(Map<String, ? super Object> p)
             throws IOException {
         File appImage = StandardBundlerParam.getPredefinedAppImage(p);
         File appDir = null;
@@ -318,9 +318,6 @@
             return null;
         } finally {
             try {
-                if (ECHO_MODE.fetchFrom(p)) {
-                    saveConfigFiles(p);
-                }
                 if (imageDir != null &&
                         PREDEFINED_APP_IMAGE.fetchFrom(p) == null &&
                         (PREDEFINED_RUNTIME_IMAGE.fetchFrom(p) == null ||
@@ -358,36 +355,6 @@
         }
     }
 
-    protected void saveConfigFiles(Map<String, ? super Object> params) {
-        try {
-            File configRoot = CONFIG_ROOT.fetchFrom(params);
-            File rootDir = LinuxAppBundler.getRootDir(
-                    RPM_IMAGE_DIR.fetchFrom(params), params);
-
-            if (getConfig_SpecFile(params).exists()) {
-                IOUtils.copyFile(getConfig_SpecFile(params),
-                        new File(configRoot,
-                                getConfig_SpecFile(params).getName()));
-            }
-            if (getConfig_DesktopShortcutFile(rootDir, params).exists()) {
-                IOUtils.copyFile(getConfig_DesktopShortcutFile(rootDir, params),
-                        new File(configRoot, getConfig_DesktopShortcutFile(
-                                rootDir, params).getName()));
-            }
-            if (getConfig_IconFile(rootDir, params).exists()) {
-                IOUtils.copyFile(getConfig_IconFile(rootDir, params),
-                        new File(configRoot,
-                                getConfig_IconFile(rootDir, params).getName()));
-            }
-
-            Log.info(MessageFormat.format(
-                    I18N.getString("message.config-save-location"),
-                    configRoot.getAbsolutePath()));
-        } catch (IOException ioe) {
-            ioe.printStackTrace();
-        }
-    }
-
     private String getLicenseFileString(Map<String, ? super Object> params) {
         StringBuilder sb = new StringBuilder();
         for (String f: LICENSE_FILE.fetchFrom(params)) {
@@ -744,7 +711,7 @@
                 "--define", "%_topdir " + broot.getAbsolutePath()
         );
         pb = pb.directory(RPM_IMAGE_DIR.fetchFrom(params));
-        IOUtils.exec(pb, ECHO_MODE.fetchFrom(params));
+        IOUtils.exec(pb, false);
 
         if (!Log.isDebug()) {
             IOUtils.deleteRecursive(broot);