test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LinuxHelper.java
branchJDK-8200758-branch
changeset 58791 fca9cb5f4953
parent 58762 0fe62353385b
equal deleted inserted replaced
58764:015949faea55 58791:fca9cb5f4953
    61         }
    61         }
    62 
    62 
    63         final String release = getRelease(cmd);
    63         final String release = getRelease(cmd);
    64         final String version = cmd.version();
    64         final String version = cmd.version();
    65 
    65 
    66         return String.format(format,
    66         return String.format(format, getPackageName(cmd), version, release,
    67                 getPackageName(cmd), version, release, getPackageArch(packageType))
    67                 getDefaultPackageArch(packageType)) + packageType.getSuffix();
    68                 + packageType.getSuffix();
       
    69     }
    68     }
    70 
    69 
    71     public static Stream<Path> getPackageFiles(JPackageCommand cmd) {
    70     public static Stream<Path> getPackageFiles(JPackageCommand cmd) {
    72         cmd.verifyIsOfType(PackageType.LINUX);
    71         cmd.verifyIsOfType(PackageType.LINUX);
    73 
    72 
   375                 .setExecutable("xdg-mime")
   374                 .setExecutable("xdg-mime")
   376                 .addArguments("query", "default", mimeType)
   375                 .addArguments("query", "default", mimeType)
   377                 .executeAndGetFirstLineOfOutput();
   376                 .executeAndGetFirstLineOfOutput();
   378     }
   377     }
   379 
   378 
   380     private static String getPackageArch(PackageType type) {
   379     public static String getDefaultPackageArch(PackageType type) {
   381         if (archs == null) {
   380         if (archs == null) {
   382             archs = new HashMap<>();
   381             archs = new HashMap<>();
   383         }
   382         }
   384 
   383 
   385         String arch = archs.get(type);
   384         String arch = archs.get(type);