> Instead, echo the command we are about to run. > > Closes: https://bugs.gentoo.org/838475 > Closes: https://bugs.gentoo.org/838478 > Closes: https://bugs.gentoo.org/838481 > Closes: https://bugs.gentoo.org/838487 > Closes: https://bugs.gentoo.org/838490 > Closes: https://bugs.gentoo.org/838493 > Signed-off-by: Mike Gilbert <floppym@g.o> > --- > eclass/java-utils-2.eclass | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass > index 11798908dae..2a649942550 100644 > --- a/eclass/java-utils-2.eclass > +++ b/eclass/java-utils-2.eclass > @@ -2099,8 +2099,9 @@ ejavac() { > einfo "${compiler_executable} ${javac_args} ${@}" > fi > > - ebegin "Compiling" > - ${compiler_executable} ${javac_args} "${@}" || die "ejavac > failed" > + local args=( ${compiler_executable} ${javac_args} "${@}" ) > + echo "${args[@]}" >&2 > + "${args[@]}" || die "ejavac failed" > } > > # @FUNCTION: ejavadoc > @@ -2125,8 +2126,9 @@ ejavadoc() { > einfo "javadoc ${javadoc_args} ${@}" > fi > > - ebegin "Generating JavaDoc" > - javadoc ${javadoc_args} "${@}" || die "ejavadoc failed" > + local args=( javadoc ${javadoc_args} "${@}" ) > + echo "${args[@]}" >&2 > + "${args[@]}" || die "ejavadoc failed" > } > > # @FUNCTION: java-pkg_filter-compiler
I've got only a minor concern regarding printing the full 'javac' and 'javadoc' command with arguments: for Java packages that use a lot of Java dependencies (including indirect, transitive Java dependencies) and/or call the 'ejavac' function with a very long list of arguments, this might generate way more verbose output than before. A good example package is dev-java/log4j-core, which does both of these things -- try compiling it and compare the Portage output. Though, this opinion is merely from a humble man who's been mostly working on Java packages exclusively. Actually, many non-Java ebuilds produce output with similar verbosity. One thing that is still worth noting is, unlike compilation of a C/C++ program, where each compiler invocation usually just processes a few files, a single invocation of javac usually involves putting _all_ Java source files' names into the command-line arguments. Best regards, Leo