[puppet/el4] Silence deprecation warnings in yumrepo type (#615175, upstream #4252)

Todd Zullinger tmz at fedoraproject.org
Tue Oct 4 01:21:41 UTC 2011


commit 94149aa03e34a801a00193c3bfcdaa0290188c38
Author: Todd Zullinger <tmz at pobox.com>
Date:   Mon Oct 3 21:12:28 2011 -0400

    Silence deprecation warnings in yumrepo type (#615175, upstream #4252)

 puppet-0.25.5-yumrepo-deprecation-warning.patch |   25 +++++++++++++++++++++++
 puppet.spec                                     |    5 ++++
 2 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/puppet-0.25.5-yumrepo-deprecation-warning.patch b/puppet-0.25.5-yumrepo-deprecation-warning.patch
new file mode 100644
index 0000000..67fe4f2
--- /dev/null
+++ b/puppet-0.25.5-yumrepo-deprecation-warning.patch
@@ -0,0 +1,25 @@
+From 95231c6cac7359f6b8fa3f7a9b30a47e90861b4c Mon Sep 17 00:00:00 2001
+From: James Turnbull <james at lovedthanlost.net>
+Date: Fri, 16 Jul 2010 14:42:01 +1000
+Subject: [PATCH/puppet] Fixed yumrepo type deprecation warning
+
+---
+ lib/puppet/type/yumrepo.rb |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/lib/puppet/type/yumrepo.rb b/lib/puppet/type/yumrepo.rb
+index 51ed17b..09dcad6 100644
+--- a/lib/puppet/type/yumrepo.rb
++++ b/lib/puppet/type/yumrepo.rb
+@@ -86,7 +86,7 @@ module Puppet
+             clear
+             inifile.each_section do |s|
+                 next if s.name == "main"
+-                obj = create(:name => s.name, :check => check)
++                obj = new(:name => s.name, :check => check)
+                 current_values = obj.retrieve
+                 obj.eachproperty do |property|
+                     if current_values[property].nil?
+-- 
+1.7.2.1
+
diff --git a/puppet.spec b/puppet.spec
index e337d8d..cda2211 100644
--- a/puppet.spec
+++ b/puppet.spec
@@ -12,6 +12,9 @@ License:        GPLv2+
 URL:            http://puppetlabs.com
 Source0:        http://puppetlabs.com/downloads/%{name}/%{name}-%{version}.tar.gz
 Source1:        http://puppetlabs.com/downloads/%{name}/%{name}-%{version}.tar.gz.sign
+# http://projects.puppetlabs.com/issues/show/4252
+# https://bugzilla.redhat.com/show_bug.cgi?id=615175
+Patch0:         puppet-0.25.5-yumrepo-deprecation-warning.patch
 
 Group:          System Environment/Base
 
@@ -66,6 +69,7 @@ The server can also function as a certificate authority and file server.
 
 %prep
 %setup -q
+%patch0 -p1
 patch -p1 < conf/redhat/rundir-perms.patch
 
 %build
@@ -224,6 +228,7 @@ rm -rf %{buildroot}
 %changelog
 * Mon Oct 03 2011 Todd Zullinger <tmz at pobox.com> - 0.25.5-2
 - Create and own /usr/share/puppet/modules (#615432)
+- Silence deprecation warnings in yumrepo type (#615175, upstream #4252)
 
 * Mon May 17 2010 Todd Zullinger <tmz at pobox.com> - 0.25.5-1
 - Update to 0.25.5


More information about the scm-commits mailing list