[Git][java-team/javatools][master] 3 commits: jh_build: Fix regression in interpretation of d/javabuild
Niels Thykier
gitlab at salsa.debian.org
Sun Apr 7 14:20:25 BST 2019
Niels Thykier pushed to branch master at Debian Java Maintainers / javatools
Commits:
3fa83a02 by Niels Thykier at 2019-04-07T12:09:45Z
jh_build: Fix regression in interpretation of d/javabuild
Signed-off-by: Niels Thykier <niels at thykier.net>
- - - - -
0c9446ff by Niels Thykier at 2019-04-07T13:14:19Z
jh_build: Deprecate -N as --no-javadoc and fix its non-determinism
Signed-off-by: Niels Thykier <niels at thykier.net>
- - - - -
6f49661f by Niels Thykier at 2019-04-07T13:19:20Z
Release javatools/0.72.8
Signed-off-by: Niels Thykier <niels at thykier.net>
- - - - -
2 changed files:
- debian/changelog
- jh_build
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,19 @@
+javatools (0.72.8) unstable; urgency=medium
+
+ * Team upload.
+ * jh_build: Fix a regression in 0.72.7 where the first
+ parameter of debian/javabuild was incorrectly interpreted
+ as a glob that had to match something (rather than the
+ name of the output file). Thanks to Ole Streicher for
+ reporting this issue. (Closes: #925507)
+ * jh_build: Deprecate -N as short form of --no-javadoc and
+ add a work around to make -N work reliably. This fixes
+ -N being either --no-package or --no-javadoc with a 50/50
+ probability. Thanks to Gilles Filippini for reporting
+ the issue. (Closes: #926542)
+
+ -- Niels Thykier <niels at thykier.net> Sun, 07 Apr 2019 13:18:04 +0000
+
javatools (0.72.7) unstable; urgency=medium
* Team upload.
=====================================
jh_build
=====================================
@@ -9,6 +9,7 @@ jh_build - compile java sources in the absence of a (useful) upstream build syst
use strict;
use warnings;
use Cwd qw(realpath);
+use List::Util qw(any);
# Value to pass to -source/-target by default
use constant DEFAULT_JAVA_RELEASE => '1.7';
@@ -57,13 +58,11 @@ This makes B<java -jar I<generated-jar-file>> run that class.
Use I<home> as B<JAVA_HOME> (overrides the B<JAVA_HOME> environment variable).
-=item B<-J>, B<--javadoc>, B<-N>, B<--no-javadoc>
+=item B<-J>, B<--javadoc>, B<--no-javadoc>
Whether or not to build javadoc for the jar files. The default is to
generate javadoc along with the jar files.
-The B<-N> is the short variant of B<--no-javadoc>.
-
=item B<-o> I<options>, B<--javacopts=>I<options>
Pass I<options> to javac (when invoking javac). The I<options> value
@@ -121,11 +120,20 @@ my (@JAVAC, @JAVADOC, @JAR, @builds);
$CLASSPATH =~ tr/:/ /;
@JH_JAR_EXTRA = split(' ', $ENV{'JH_JAR_EXTRA'}) if @JH_JAR_EXTRA;
+# Work around #926542.
+if (any { $_ eq '-N' } @ARGV) {
+ warning(q{Use of -N as --no-javadoc is deprecated as it clashes with debhelper's -N option});
+ warning('Please migrate to --no-javadoc as soon as possible');
+ warning(q{If you wanted debhelper's --no-package option, then please use -N<pkg> (without a space)});
+ $build_javadoc = 0;
+ @ARGV = grep { $_ ne '-N' } @ARGV; ## no critic
+}
+
init(options => {
'main|m=s' => \$main_class,
'java-home|j=s' => \$JAVA_HOME,
'javadoc|J!' => $build_javadoc,
- 'no-javadoc|N' => sub { $build_javadoc = 0; },
+ 'no-javadoc' => sub { $build_javadoc = 0; },
'clean' => \$do_clean,
# Space-separated list of options
'javacopts|o=s' => sub { @javac_opts = split(' ', $_[1])},
@@ -249,7 +257,13 @@ sub do_build {
if (@ARGV) {
push(@builds, [@ARGV]);
} elsif (-f 'debian/javabuild') {
- @builds = filedoublearray('debian/javabuild', ['.'])
+ # We have to manually handle globs as the first argument is not
+ # a glob but the desired path for the generated jar file.
+ for my $build_request (filedoublearray('debian/javabuild')) {
+ my ($jar_file, @source_globs) = @{$build_request};
+ my @sources = glob_expand(['.'], \&glob_expand_error_handler_reject, @source_globs);
+ push(@builds, [$jar_file, @sources]);
+ }
}
if (@builds) {
View it on GitLab: https://salsa.debian.org/java-team/javatools/compare/4486bd96b55c4b695aff2ee2e5d7a92d926ef9f2...6f49661fe88f9b0e8985a43d00d72e33c1697881
--
View it on GitLab: https://salsa.debian.org/java-team/javatools/compare/4486bd96b55c4b695aff2ee2e5d7a92d926ef9f2...6f49661fe88f9b0e8985a43d00d72e33c1697881
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190407/8244ecf4/attachment.html>
More information about the pkg-java-commits
mailing list