ports/188675: [PATCH] sysutils/puppet: Silence ruby19+ warning

Mathieu Arnold mat at freebsd.org
Tue Apr 15 22:30:00 UTC 2014


>Number:         188675
>Category:       ports
>Synopsis:       [PATCH] sysutils/puppet: Silence ruby19+ warning
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 15 22:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Mathieu Arnold
>Release:        FreeBSD 10.0-RELEASE i386
>Organization:
Absolight
>Environment:
System: FreeBSD aragorn.in.absolight.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 17 01:46:25 UTC
>Description:
Starting with ruby 1.9.2, setting a class variable from the class emmits a warning:
/usr/local/lib/ruby/site_ruby/1.9/puppet/provider/package/freebsd.rb:18: warning: class variable access from toplevel
/usr/local/lib/ruby/site_ruby/1.9/puppet/provider/package/freebsd.rb:19: warning: class variable access from toplevel

This is the way it is silenced (it is silly, yes, but it is how it is.)

Generated with FreeBSD Port Tools 1.01 (mode: change, diff: SVN)
>How-To-Repeat:
>Fix:

--- puppet-3.4.3.patch begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 351369)
+++ Makefile	(working copy)
@@ -3,6 +3,7 @@
 
 PORTNAME=	puppet
 PORTVERSION=	3.4.3
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	http://downloads.puppetlabs.com/puppet/
 
Index: files/optpatch-package_origin
===================================================================
--- files/optpatch-package_origin	(revision 351369)
+++ files/optpatch-package_origin	(working copy)
@@ -30,8 +30,8 @@
  
 -  def self.listcmd
 -    command(:pkginfo)
-+  @@lock = Mutex.new
-+  @@ports_index = nil
++  class_variable_set(:@@lock, Mutex.new)
++  class_variable_set(:@@ports_index, nil)
 +
 +  # fix bug in URI::FTP merge method that tries to set typecode
 +  # even when other is a string.
--- puppet-3.4.3.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list