[Pkg-puppet-devel] Bug#1009643: Acknowledgement (Puppet: Fails to work with Ruby 3.0)

Mike Jonkmans debian at jonkmans.nl
Fri May 27 18:50:13 BST 2022


On Wed, 13 Apr 2022 17:31:59 +0200 Sven Mueller <sven.mueller72 at gmail.com> wrote:
> Just a quick update:
> 
> The problem of this particular one is:
> 
> in puppet/file_system.rb
> 
>   def self.symlink(path, dest, options = {})
>     @impl.symlink(assert_path(path), dest, options)
>   end
> 
> Changing this to:
> 
>   def self.symlink(path, dest, **options)
>     @impl.symlink(assert_path(path), dest, **options)
>   end
> 
> Works.
> 
> I suspect the fix to https://bugs.debian.org/1006231 to look very similar,
> but there are lots of code locations that use the same "hash as vararg"
> mechanism.

Using 'recurse => remote',
whilst the source directory at the puppetmaster contains symlinks,
i got the same errors:
  Error: Could not set 'link' on ensure: wrong number of arguments (given 3,
expected 2)

I could solve these using the same method as above.

In /usr/lib/ruby/vendor_ruby/puppet/file_system/file_impl.rb
replace

  def symlink(path, dest, options = {})
    FileUtils.symlink(path, dest, options)
  end

with:

  def symlink(path, dest, **options)
    FileUtils.symlink(path, dest, **options)
  end

After applying both these changes, i saw no errors anymore.

Thanks for putting me on the right track.

--
Sent from Linux.
Regards, Mike Jonkmans <bugs.debian at jonkmans.nl>



More information about the Pkg-puppet-devel mailing list