[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

Luke Kanies luke at puppetlabs.com
Wed Jul 14 10:32:29 UTC 2010


The following commit has been merged in the upstream branch:
commit 9792915481ed757c56768f8f5e4fd100217b7232
Author: Luke Kanies <luke at puppetlabs.com>
Date:   Mon Apr 12 15:43:07 2010 -0700

    Fixing yumrepo type to use 'flush'
    
    It was previously relying on monkey-patching the
    last 'Change' instance in 'evaluate', but we removed
    'evaluate', so this wasn't working any more.
    
    Signed-off-by: Luke Kanies <luke at puppetlabs.com>

diff --git a/lib/puppet/type/yumrepo.rb b/lib/puppet/type/yumrepo.rb
index 51ed17b..018fd05 100644
--- a/lib/puppet/type/yumrepo.rb
+++ b/lib/puppet/type/yumrepo.rb
@@ -203,32 +203,8 @@ module Puppet
             self.class.section(self[:name])
         end
 
-        def evaluate
-            changes = super
-            # FIXME: Dirty, dirty hack
-            # We amend the go method of the last change to trigger
-            # writing the whole file
-            # A cleaner solution would be to either use the composite
-            # pattern and encapsulate all changes into a change that does
-            # not depend on a property and triggers storing, or insert another
-            # change at the end of changes to trigger storing Both
-            # solutions require that the PropertyChange interface be
-            # abstracted so that it can work with a change that is not
-            # directly backed by a Property
-            unless changes.empty?
-                class << changes[-1]
-                    def go
-                        result = super
-                        self.property.resource.store
-                        return result
-                    end
-                end
-            end
-            return changes
-        end
-
         # Store modifications to this yumrepo resource back to disk
-        def store
+        def flush
             self.class.store
         end
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list