Package: gradle-helper-plugin
Version: 1.5.1
Severity: important

Hi,

There is bug in gradle.pm that is hidden by bug in Dh_lib.  I intend
to fix the latter soon, which will cause issues in gradle.pm once that
happens.  This bug is here:


> sub clean {
>       my $this=shift;
> 
>       $this->doit_in_builddir("find . -wholename .*build/tmp | xargs echo | 
> sed -e 's^build/tmp^build^g' | xargs rm -Rf");
                                
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>       $this->doit_in_builddir("find . -wholename .*build/debian | xargs echo 
> | sed -e 's^build/tmp^build^g' | xargs rm -Rf");
                                
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>       $this->doit_in_builddir("rm", "-Rf", "$this->{cwd}/.gradle", 
> "$this->{cwd}/buildSrc/.gradle", ".m2");
> }


The "doit_in_builddir" method calls "print_and_doit", which in turn
calls "doit".  The API of doit intends for it to *not* fork a shell,
but the above only works in a shell call.

I will introduce a "complex_doit_in_builddir" in debhelper/10.7, which
you can use instead.  You should be able to support both the new call
plus work with older versions of debhelper by relying on "can" a la:

"""
  if ($this->can('complex_doit_in_builddir')) {
    $this->complex_doit_in_builddir(...);
    $this->complex_doit_in_builddir(...);
  } else {
    $this->doit_in_builddir(...);
    $this->doit_in_builddir(...);
  }
"""

Thanks,
~Niels

Reply via email to