[jruby-maven-plugins] 11/15: Add snakeyaml.patch and fix FTBFS with Snakeyaml 1.17.

Markus Koschany apo at moszumanska.debian.org
Wed Dec 28 20:24:43 UTC 2016


This is an automated email from the git hooks/post-receive script.

apo pushed a commit to branch master
in repository jruby-maven-plugins.

commit e12282bc309468c53326b01e681c6ee52fc1b8eb
Author: Markus Koschany <apo at debian.org>
Date:   Wed Dec 28 20:51:14 2016 +0100

    Add snakeyaml.patch and fix FTBFS with Snakeyaml 1.17.
    
    Closes: #844841
---
 debian/patches/series          |  1 +
 debian/patches/snakeyaml.patch | 47 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 7c79afa..755b9bd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 disable-rubygems-repo.diff
+snakeyaml.patch
diff --git a/debian/patches/snakeyaml.patch b/debian/patches/snakeyaml.patch
new file mode 100644
index 0000000..dff36ba
--- /dev/null
+++ b/debian/patches/snakeyaml.patch
@@ -0,0 +1,47 @@
+From: Markus Koschany <apo at debian.org>
+Date: Wed, 28 Dec 2016 20:48:09 +0100
+Subject: snakeyaml
+
+Dumper and Loader classes have long been dreprecated and are no longer
+available in Debian's version of SnakeYaml. This patch directly uses the Yaml
+class and fixes a build failure.
+
+Debian-Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844841
+Forwarded: no
+---
+ .../java/de/saumya/mojo/gems/spec/yaml/YamlGemSpecificationIO.java  | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/ruby-tools/src/main/java/de/saumya/mojo/gems/spec/yaml/YamlGemSpecificationIO.java b/ruby-tools/src/main/java/de/saumya/mojo/gems/spec/yaml/YamlGemSpecificationIO.java
+index 11eb133..783c830 100644
+--- a/ruby-tools/src/main/java/de/saumya/mojo/gems/spec/yaml/YamlGemSpecificationIO.java
++++ b/ruby-tools/src/main/java/de/saumya/mojo/gems/spec/yaml/YamlGemSpecificationIO.java
+@@ -3,9 +3,7 @@ package de.saumya.mojo.gems.spec.yaml;
+ import java.io.IOException;
+ 
+ import org.codehaus.plexus.component.annotations.Component;
+-import org.yaml.snakeyaml.Dumper;
+ import org.yaml.snakeyaml.DumperOptions;
+-import org.yaml.snakeyaml.Loader;
+ import org.yaml.snakeyaml.Yaml;
+ import org.yaml.snakeyaml.constructor.Constructor;
+ 
+@@ -37,7 +35,6 @@ public class YamlGemSpecificationIO implements GemSpecificationIO {
+     protected Yaml getYaml() {
+         if (this._yaml == null) {
+             final Constructor constructor = new MappingConstructor();
+-            final Loader loader = new Loader(constructor);
+ 
+             final DumperOptions dumperOptions = new DumperOptions();
+             dumperOptions.setExplicitStart(true);
+@@ -45,9 +42,8 @@ public class YamlGemSpecificationIO implements GemSpecificationIO {
+             dumperOptions.setDefaultScalarStyle(DumperOptions.ScalarStyle.PLAIN);
+ 
+             final MappingRepresenter representer = new MappingRepresenter();
+-            final Dumper dumper = new Dumper(representer, dumperOptions);
+ 
+-            this._yaml = new Yaml(loader, dumper);
++            this._yaml = new Yaml(constructor, representer, dumperOptions);
+         }
+ 
+         return this._yaml;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-maven-plugins.git



More information about the pkg-java-commits mailing list