Package: puppet
Version: 5.5.22-1

This is a similar but different bug as https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955532 .

I get this warning on a puppet run:

/usr/lib/ruby/vendor_ruby/puppet/file_system/uniquefile.rb:126: warning: $SAFE will become a normal global variable in Ruby 3.0

I tried fixing it by setting Warning[:deprecated] = false, but that does not work for this specific warning, weirdly enough.

So I tried another minimal approach. This fixes it for me, and it should also fix those other deprecation warnings from #955532, so that patch can be dropped if you want.

--- a/puppet 2020-10-25 18:04:24.000000000 +0100
+++ b/puppet 2020-10-27 19:45:13.784467214 +0100
@@ -1,5 +1,11 @@
 #!/usr/bin/ruby

+def Warning.warn(w)
+ if w !~ /warning: (URI.(un|)escape is obsolete|\$SAFE will become a normal global variable)/
+    super w
+  end
+end
+
 begin
   require 'puppet/util/command_line'
   Puppet::Util::CommandLine.new.execute

Mike.

Reply via email to