[jdk8u-dev] RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v3]
Alexey Bakhtin
abakhtin at openjdk.org
Wed Dec 4 17:40:47 UTC 2024
On Wed, 4 Dec 2024 15:37:44 GMT, Alexey Bakhtin <abakhtin at openjdk.org> wrote:
>> Thanks for this contribution.
>>
>> One minor comment regarding the text "-k/k" in the warning message. Passing the argument as a standalone "-k" seems to work only with GNUStyleOptions. We can pass "-k..." (along with other options), but the most typical invocation would be "-xk...". I'm okay with the suggested "-k/k" text but would have been okay with with "k" too.
>>
>> I have the impression that the addition of "main.help.opt.extract.keep-old-files" is related to GNUStyleOptions. The place where "-k Do not overwrite existing files" was added is not the exact equivalent, but we should be able to live with that. Just wonder if we should add "k" to "[vfmn0PMe]". What do you think?
>>
>> The test "testGnuOptionsKeptOldFile" does not apply, does it? The leading "-" is optional for the non-Gnu interface.
>
> Hello @martinuy
> Thank you for review
>
>> One minor comment regarding the text "-k/k" in the warning message. Passing the argument as a standalone "-k" seems to work only with GNUStyleOptions. We can pass "-k..." (along with other options), but the most typical invocation would be "-xk...". I'm okay with the suggested "-k/k" text but would have been okay with with "k" too.
>
> You are right. "-k" is not used separately, so I have updated the warning message
>
>> I have the impression that the addition of "main.help.opt.extract.keep-old-files" is related to GNUStyleOptions. The place where "-k Do not overwrite existing files" was added is not the exact equivalent, but we should be able to live with that. Just wonder if we should add "k" to "[vfmn0PMe]". What do you think?
>
> Good catch. Thank you. It should be added as soon as it is main usage string for JDK8
>
>> The test "testGnuOptionsKeptOldFile" does not apply, does it? The leading "-" is optional for the non-Gnu interface.
>
> Right. "testGnuOptionsKeptOldFile" does not apply for JDK8
> @alexeybakhtin , thanks for considering the suggested changes.
>
> Looks like `jar_pt_BR.properties` was missed, if we really want to update all `jar...properties`. Changes to `jar...properties` make me think that the new option will not be documented for languages other than English. Would be very tricky to do the translation for all languages and perhaps is acceptable not to do it, as it has not been done for JDK main line either. While the spirit in 8u was different, it's not unreasonable for developer tools to be in English only. I'd suggest to update `jar_pt_BR.properties` and leave it there. The reader will probably fall back to English for an explanation of the (undocumented) `k`. If people really want to do the translation, I can contribute Spanish and Portuguese.
>
> What do you think?
Thank you @martinuy
Added the 'k' option to `jar_pt_BR.properties`. Translation for new and missed options can be done separately.
-------------
PR Comment: https://git.openjdk.org/jdk8u-dev/pull/608#issuecomment-2518114588
More information about the jdk8u-dev
mailing list