jpackage: improve sign errors reporting

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 27
    • Affects Version/s: None
    • Component/s: tools
    • master
    • generic
    • os_x

      Currently, when signing on macOS fails, jpackage would report it as follows:

      "codesign" failed with following output:
      jpackage-tests/MacSignTest/testAppContentWarning/output/AppContentWarningMacSignTest.app: replacing existing signature
      jpackage-tests/MacSignTest/testAppContentWarning/output/AppContentWarningMacSignTest.app: bundle format unrecognized, invalid, or unsuitable
      In subcomponent: jpackage-tests/MacSignTest/testAppContentWarning/output/AppContentWarningMacSignTest.app/Contents/foo.1
      jdk.jpackage.internal.util.function.ExceptionBox: jdk.jpackage.internal.Codesign$CodesignException
              at jdk.jpackage/jdk.jpackage.internal.util.function.ExceptionBox.toUnchecked(ExceptionBox.java:51)
              <stack trace omitted>
      Error: jdk.jpackage.internal.Codesign$CodesignException

      It prints only the command name without the arguments. Though for other errors, jpackage will print the full command line and the command output.

      Rework reporting of the signing errors so that they are reported like other errors.

      Additionally, when reporting external command errors, make jpackage always print a command's output, regardless of whether it is running in verbose or quiet mode.

      Currently, it prints command output only in quiet mode, assuming that in verbose mode, the output is printed immediately after the command execution.

      However, jpackage runs some commands quietly in verbose mode; if one of them fails, the user doesn't see its output.

            Assignee:
            Alexey Semenyuk
            Reporter:
            Alexey Semenyuk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: