On Mon, 3 May 2021 17:30:15 GMT, Alexander Matveev <[email protected]> wrote:
>> test/jdk/tools/jpackage/macosx/HostArchPkgTest.java line 57:
>>
>>> 55: Path distributionFile = cmd.unpackedPackageDirectory()
>>> 56: .toAbsolutePath()
>>> 57: .getParent()
>>
>> Why .getParent() is needed here?
>
> Unpacking pkg is two stage process. First we unpack it to unpacked-pkg/data
> which contains Distribution file, pkg background images and tar archive with
> app itself. Then we unpack app tar archive to unpacked-pkg/unpacked. Test
> needs to check unpacked-pkg/data/Distribution and
> cmd.pathToUnpackedPackageFile("/") returns path to unpacked-pkg/unpacked.
> Thus getParent() is used to move up.
Understood. Thank you for explanation!
-------------
PR: https://git.openjdk.java.net/jdk/pull/3807