On Sat, Jul 13, 2013 at 9:35 AM, <[email protected]> wrote: > I have a provider which is managing entries in a Windows registry hive > which may or may not be loaded. If the hive is not loaded, I load it in > '#exists?'. The question I have is: how can I ensure that this hive in > unloaded when I'm done with it? > > I can unload it in '#flush', except for the case where the resource > doesn't change. I thought maybe a dummy property (that unloads the hive in > its setter, or alternatively ensures that the resource always changes, > forcing #flush to be called) could be used, but that seems like a really > crappy solution. > > Is there a 'proper' way to do this sort of thing? >
Currently I'm doing a horrible monkey patch of Puppet::Transaction (caveats implied): https://github.com/vmware/vmware-vmware_lib/blob/master/lib/puppet_x/puppetlabs/transport.rb#L4-L13 I think there's an open ticket, and I would like to find a better option for this as well. HTH, Nan -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-dev. For more options, visit https://groups.google.com/groups/opt_out.
