Bug 184005 - sysutils/puppet 3.3.1 freebsd package provider patch is incredibly noisy under ruby 1.9
Summary: sysutils/puppet 3.3.1 freebsd package provider patch is incredibly noisy unde...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-15 18:30 UTC by Tristan Smith
Modified: 2014-04-16 14:50 UTC (History)
0 users

See Also:


Attachments
smime.p7s (5.33 KB, application/pkcs7-signature)
2013-11-15 18:56 UTC, Tristan Smith
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tristan Smith 2013-11-15 18:30:02 UTC
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.

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.
How-To-Repeat: install puppet 3.3.1 with ruby 1.9.x.

puppet apply -e 'package{ "shells/bash": ensure => installed}'
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-11-16 01:30:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->swills

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-04-16 14:45:13 UTC
Author: swills
Date: Wed Apr 16 13:45:10 2014
New Revision: 351385
URL: http://svnweb.freebsd.org/changeset/ports/351385
QAT: https://qat.redports.org/buildarchive/r351385/

Log:
  - Fix warning in pkg provider
  
  PR:		ports/184005 [1]
  PR:		ports/188675 [2]
  Submitted by:	Tristan Smith <tsmith@palantir.com> [1]
  Submitted by:	Mathieu Arnold <mat@freebsd.org> [2]

Modified:
  head/sysutils/puppet/Makefile
  head/sysutils/puppet/files/optpatch-package_origin

Modified: head/sysutils/puppet/Makefile
==============================================================================
--- head/sysutils/puppet/Makefile	Wed Apr 16 13:40:14 2014	(r351384)
+++ head/sysutils/puppet/Makefile	Wed Apr 16 13:45:10 2014	(r351385)
@@ -3,6 +3,7 @@
 
 PORTNAME=	puppet
 PORTVERSION=	3.4.3
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	http://downloads.puppetlabs.com/puppet/
 

Modified: head/sysutils/puppet/files/optpatch-package_origin
==============================================================================
--- head/sysutils/puppet/files/optpatch-package_origin	Wed Apr 16 13:40:14 2014	(r351384)
+++ head/sysutils/puppet/files/optpatch-package_origin	Wed Apr 16 13:45:10 2014	(r351385)
@@ -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.
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Steve Wills freebsd_committer freebsd_triage 2014-04-16 14:45:24 UTC
State Changed
From-To: open->closed

Committed. Thanks!