Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Nov 2013 18:27:06 GMT
From:      Tristan Smith <tsmith@palantir.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/184005: Puppet 3.3.1 freebsd package provider patch is incredibly noisy under ruby 1.9
Message-ID:  <201311151827.rAFIR6FZ081362@oldred.freebsd.org>
Resent-Message-ID: <201311151830.rAFIU2Zr033158@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         184005
>Category:       ports
>Synopsis:       Puppet 3.3.1 freebsd package provider patch is incredibly noisy under ruby 1.9
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 15 18:30:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Tristan Smith
>Release:        9.1
>Organization:
>Environment:
FreeBSD main.foo.vm 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Under Puppet 3.3.1 with ruby 1.9.3, the package provider patches provided in freebsd ports appear to clash with puppet's best practices. When attempting to realize package resources, it gouts forth the line

/usr/local/lib/ruby/site_ruby/1.9/puppet/provider/package/freebsd.rb:84: warning: class variable access from toplevel

, one for every line in the INDEX.bz2, every time it parses the index. I ended up with 30000 lines of output.


>How-To-Repeat:
install puppet 3.3.1 with ruby 1.9.x.

puppet apply -e 'package{ "shells/bash": ensure => installed}'
>Fix:
Based on http://projects.puppetlabs.com/issues/8974

I patched the @@variable definitions that were apparently causing the problem:

/usr/local/lib/ruby/site_ruby/1.9/puppet/provider/package/freebsd.rb


18,19c18,19
<   @@lock = Mutex.new
<   @@ports_index = nil
---
>   class_variable_set(:@@lock , Mutex.new )
>   class_variable_set(:@@ports_index , nil )


and blessed silence ensued. 

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311151827.rAFIR6FZ081362>