Bug#893487: gradle FTBFS due to missing cast "as long"

2018-03-19 Thread Tiago Stürmer Daitx
Package: gradle
Version: 3.4.1-2
Followup-For: Bug #893487

Dear Maintainer,

please consider the attached debdiff for a suggested fix.

thanks

Tiago Daitx

-- System Information:
Debian Release: buster/sid
  APT prefers bionic
  APT policy: (500, 'bionic'), (400, 'bionic-proposed')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-10-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), LANGUAGE=en_US 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru gradle-3.4.1/debian/changelog gradle-3.4.1/debian/changelog
--- gradle-3.4.1/debian/changelog   2017-11-29 16:09:02.0 +0100
+++ gradle-3.4.1/debian/changelog   2018-03-19 12:19:49.0 +0100
@@ -1,3 +1,10 @@
+gradle (3.4.1-3) UNRELEASED; urgency=medium
+
+  * d/p/cast-estimated-runtime-to-long.patch: fix FTBFS due to missing cast.
+(Closes: #893487)
+
+ -- Tiago Stürmer Daitx   Mon, 19 Mar 2018 11:19:49 
+
+
 gradle (3.4.1-2) experimental; urgency=medium
 
   * Team upload.
diff -Nru gradle-3.4.1/debian/patches/cast-estimated-runtime-to-long.patch 
gradle-3.4.1/debian/patches/cast-estimated-runtime-to-long.patch
--- gradle-3.4.1/debian/patches/cast-estimated-runtime-to-long.patch
1970-01-01 01:00:00.0 +0100
+++ gradle-3.4.1/debian/patches/cast-estimated-runtime-to-long.patch
2018-03-19 12:15:47.0 +0100
@@ -0,0 +1,22 @@
+Description: gradle 3.4.1 FTBFS with a missing cast to long
+ estimatedRuntime must be cast to long otherwise gradle 3.4.1 FTBFS with
+ buildSrc/src/main/groovy/org/gradle/testing/DistributedPerformanceTest.groovy:
+ 134: [Static type checking] - Cannot assign value of type java.math.BigDecimal
+ to variable of type long.
+Author: Tiago Stürmer Daitx 
+Bug-Debian: https://bugs.debian.org/893487
+Forwarded: no
+Last-Update: 2018-03-19
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- 
a/buildSrc/src/main/groovy/org/gradle/testing/DistributedPerformanceTest.groovy
 
b/buildSrc/src/main/groovy/org/gradle/testing/DistributedPerformanceTest.groovy
+@@ -131,7 +131,7 @@ class DistributedPerformanceTest extends
+ def scenarios = scenarioList.readLines()
+ .collect { line ->
+ def parts = Splitter.on(';').split(line).toList()
+-new Scenario(id : parts[0], estimatedRuntime: new 
BigDecimal(parts[1]), templates: parts.subList(2, parts.size()))
++new Scenario(id : parts[0], estimatedRuntime: new 
BigDecimal(parts[1]) as long, templates: parts.subList(2, parts.size()))
+ }
+ .sort{ -it.estimatedRuntime }
+ 
diff -Nru gradle-3.4.1/debian/patches/series gradle-3.4.1/debian/patches/series
--- gradle-3.4.1/debian/patches/series  2017-11-29 16:07:56.0 +0100
+++ gradle-3.4.1/debian/patches/series  2018-03-19 11:55:59.0 +0100
@@ -23,3 +23,4 @@
 use-local-artifacts.patch
 jansi.patch
 commons-io.patch
+cast-estimated-runtime-to-long.patch


Bug#893487: gradle FTBFS due to missing cast "as long"

2018-03-19 Thread Tiago Stürmer Daitx
Package: gradle
Version: 3.4.1-2
Severity: normal

Dear Maintainer,

gradle 3.4.1-2 FTBFS due to a missing cast, as per build log:


:compileJava - is not incremental (e.g. outputs have changed, no previous 
execution, etc.).
Note: /<>/buildSrc/src/main/java/WriteProperties.java uses or 
overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:buildSrc:compileGroovywarning: Implicitly compiled files were not subject to 
annotation processing.
  Use -proc:none to disable annotation processing or -implicit to specify a 
policy for implicit compilation.
1 warning
startup failed:
/<>/buildSrc/src/main/groovy/org/gradle/testing/DistributedPerformanceTest.groovy:
 134: [Static type checking] - Cannot assign value of type java.math.BigDecimal 
to variable of type long
 @ line 134, column 61.
   d : parts[0], estimatedRuntime: new BigD
 ^

1 error

 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileGroovy'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task 
':compileGroovy'.
at 
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)
at 
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
at 
org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:61)
at 
org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at 
org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at 
org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:45)
at 
org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
at 
org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at 
org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at 
org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at 
org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:233)
at 
org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
at 
org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:74)
at 
org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:55)
at 
org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at 
org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: 
Compilation failed; see the compiler error output for details.
at 
org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:179)
at 
org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:60)
at 
org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServer.execute(CompilerDaemonServer.java:31)
at 
org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:87)
at 
org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at 
org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at 
org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377)
... 2 more


BUILD FAILED

Total time: 45.972 secs
debian/rules:39: recipe for target 'override_dh_auto_build' failed


thanks

Tiago Daitx


-- System Information:
Debian Release: buster/sid
  APT prefers bionic
  APT policy: (500, 'bionic'), (400, 'bionic-proposed')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-10-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8), LANGUAGE=en_US 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled