# HG changeset patch # User herrick # Date 1564090073 14400 # Node ID cb6733b3ed62e5f3123852784bc90d52fa2f43d7 # Parent 96335b232d4d106696ba59fb8fb45692d8e4e247 JDK-8227312: Remove pkg bundle from DMG image. Reviewed-by: kcr diff -r 96335b232d4d -r cb6733b3ed62 src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppStoreBundler.java --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppStoreBundler.java Thu Jul 25 17:07:08 2019 -0400 +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppStoreBundler.java Thu Jul 25 17:27:53 2019 -0400 @@ -140,7 +140,7 @@ } // first, make sure we don't use the local signing key params.put(DEVELOPER_ID_APP_SIGNING_KEY.getID(), null); - File appLocation = prepareAppBundle(params, false); + File appLocation = prepareAppBundle(params); prepareEntitlements(params); diff -r 96335b232d4d -r cb6733b3ed62 src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBaseInstallerBundler.java --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBaseInstallerBundler.java Thu Jul 25 17:07:08 2019 -0400 +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacBaseInstallerBundler.java Thu Jul 25 17:27:53 2019 -0400 @@ -134,21 +134,17 @@ } } - protected File prepareAppBundle(Map params, - boolean pkg) throws PackagerException { + protected File prepareAppBundle(Map params) + throws PackagerException { File predefinedImage = StandardBundlerParam.getPredefinedAppImage(params); if (predefinedImage != null) { return predefinedImage; } File appImageRoot = APP_IMAGE_TEMP_ROOT.fetchFrom(params); - if (pkg) { - // create pkg in dmg - return new MacPkgBundler().bundle(params, appImageRoot); - } else { - return APP_BUNDLER.fetchFrom(params).doBundle( - params, appImageRoot, true); - } + + return APP_BUNDLER.fetchFrom(params).doBundle( + params, appImageRoot, true); } @Override diff -r 96335b232d4d -r cb6733b3ed62 src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgBundler.java --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgBundler.java Thu Jul 25 17:07:08 2019 -0400 +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgBundler.java Thu Jul 25 17:27:53 2019 -0400 @@ -61,7 +61,7 @@ try { appImageDir.mkdirs(); - if (prepareAppBundle(params, true) != null && + if (prepareAppBundle(params) != null && prepareConfigFiles(params)) { File configScript = getConfig_Script(params); if (configScript.exists()) { diff -r 96335b232d4d -r cb6733b3ed62 src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java --- a/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java Thu Jul 25 17:07:08 2019 -0400 +++ b/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java Thu Jul 25 17:27:53 2019 -0400 @@ -138,9 +138,8 @@ IOUtils.writableOutputDir(outdir.toPath()); - File appImageDir = null; try { - appImageDir = prepareAppBundle(params, false); + File appImageDir = prepareAppBundle(params); if (appImageDir != null && prepareConfigFiles(params)) { diff -r 96335b232d4d -r cb6733b3ed62 test/jdk/tools/jpackage/macosx/base/OptionsBase.java --- a/test/jdk/tools/jpackage/macosx/base/OptionsBase.java Thu Jul 25 17:07:08 2019 -0400 +++ b/test/jdk/tools/jpackage/macosx/base/OptionsBase.java Thu Jul 25 17:27:53 2019 -0400 @@ -51,9 +51,11 @@ try(var br = new BufferedReader(new FileReader(log))) { var line = br.lines().reduce((a, b) -> b).orElse(null) .split("\t"); - disk = line[0].trim(); - testPkg(line[2].trim() + File.separator + TEST_NAME + - "-1.0.pkg"); + if ((line.length < 3) || !line[2].contains(TEST_NAME)) { + throw new AssertionError( + "expected attach output to contain test name: " + + TEST_NAME); + } } } finally { if (disk != null) {