[DRE-commits] [librarian-puppet] 01/01: unbreak with ruby-puppet-forge 2.x

Michael Moll mmoll-guest at moszumanska.debian.org
Fri Mar 11 22:50:48 UTC 2016


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

mmoll-guest pushed a commit to branch master
in repository librarian-puppet.

commit 428a9e16b5e0305b38510ad0df457a6909ae0209
Author: Michael Moll <Michael Moll kvedulv at kvedulv.de>
Date:   Fri Mar 11 23:46:20 2016 +0100

    unbreak with ruby-puppet-forge 2.x
---
 debian/changelog                     |  7 +++++++
 debian/patches/puppet_forge_2.1.diff | 36 ++++++++++++++++++++++++++++++++++++
 debian/patches/series                |  1 +
 metadata.yml                         |  2 +-
 4 files changed, 45 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 5e2ff23..f42b21a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+librarian-puppet (2.2.1-3) unstable; urgency=medium
+
+  * Team upload
+  * Add patch to unbreak with ruby-puppet-forge 2.x
+
+ -- Michael Moll <kvedulv at kvedulv.de>  Fri, 11 Mar 2016 23:43:34 +0100
+
 librarian-puppet (2.2.1-2) unstable; urgency=medium
 
   [ Sebastien Badia ]
diff --git a/debian/patches/puppet_forge_2.1.diff b/debian/patches/puppet_forge_2.1.diff
new file mode 100644
index 0000000..d991e08
--- /dev/null
+++ b/debian/patches/puppet_forge_2.1.diff
@@ -0,0 +1,36 @@
+# taken from https://github.com/rodjek/librarian-puppet/pull/331
+
+--- a/lib/librarian/puppet/source/forge/repo_v3.rb
++++ b/lib/librarian/puppet/source/forge/repo_v3.rb
+@@ -22,7 +22,7 @@
+           end
+ 
+           def dependencies(version)
+-            array = get_release(version).metadata[:dependencies].map{|d| [d['name'], d['version_requirement']]}
++            array = get_release(version).metadata[:dependencies].map{|d| [d[:name], d[:version_requirement]]}
+             Hash[*array.flatten(1)]
+           end
+ 
+@@ -32,7 +32,7 @@
+             else
+               # should never get here as we use one repo object for each module (to be changed in the future)
+               debug { "Looking up url for #{name}@#{version}" }
+-              release = PuppetForge::Release.find("#{name}-#{version}")
++              release = PuppetForge::V3::Release.find("#{name}-#{version}")
+             end
+             "#{source}#{release.file_uri}"
+           end
+@@ -40,8 +40,11 @@
+         private
+ 
+           def get_module
+-            @module ||= PuppetForge::Module.find(name)
+-            raise(Error, "Unable to find module '#{name}' on #{source}") unless @module
++            begin
++              @module ||= PuppetForge::V3::Module.find(name)
++            rescue Faraday::ResourceNotFound => e
++              raise(Error, "Unable to find module '#{name}' on #{source}")
++            end
+             @module
+           end
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..26152e4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+puppet_forge_2.1.diff
diff --git a/metadata.yml b/metadata.yml
index 6520297..8d1f664 100644
--- a/metadata.yml
+++ b/metadata.yml
@@ -45,7 +45,7 @@ dependencies:
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '1.0'
+        version: '2.1'
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/librarian-puppet.git



More information about the Pkg-ruby-extras-commits mailing list