ports/162763: [patch] sysutils/zfs-snapshot-mgmt: broken with RUBY_VER=1.9 since 1.9.3-p0

Jan Beich jbeich at tormail.net
Tue Nov 22 20:20:01 UTC 2011


>Number:         162763
>Category:       ports
>Synopsis:       [patch] sysutils/zfs-snapshot-mgmt: broken with RUBY_VER=1.9 since 1.9.3-p0
>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:   Tue Nov 22 20:20:00 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
>Description:
Rename Config class to not clash with deprecated one having same name.

ref. Config = RbConfig in /usr/local/lib/rbconfig/obsolete.rb
>How-To-Repeat:
$ make install RUBY_VER=1.9
$ zfs-snapshot-mgmt
/usr/local/bin/zfs-snapshot-mgmt:182: Use RbConfig instead of obsolete and deprecated Config.
/usr/local/bin/zfs-snapshot-mgmt:182:in `<main>': Config is not a class (TypeError)
Exit 1
>Fix:
--- a.diff begins here ---
Index: sysutils/zfs-snapshot-mgmt/files/patch-zfs-snapshot-mgmt
===================================================================
RCS file: /a/.csup/ports/sysutils/zfs-snapshot-mgmt/files/patch-zfs-snapshot-mgmt,v
retrieving revision 1.1
diff -u -p -r1.1 patch-zfs-snapshot-mgmt
--- sysutils/zfs-snapshot-mgmt/files/patch-zfs-snapshot-mgmt	11 Jan 2010 03:42:14 -0000	1.1
+++ sysutils/zfs-snapshot-mgmt/files/patch-zfs-snapshot-mgmt	22 Nov 2011 19:52:25 -0000
@@ -12,3 +12,21 @@
    end
  
  private
+@@ -175,7 +179,7 @@ private
+ 
+ end
+ 
+-class Config
++class ZConfig
+   attr_reader :snapshot_prefix, :filesystems, :pools
+ 
+   def initialize(value)
+@@ -194,7 +198,7 @@ class Config
+ 
+ config_yaml = File.open(CONFIG_FILE_NAME).read(CONFIG_SIZE_MAX)
+ die "Config file too long" if config_yaml.nil?
+-config = Config.new(YAML::load(config_yaml))
++config = ZConfig.new(YAML::load(config_yaml))
+ 
+ now_minutes = Time.now.to_i / 60
+ 
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list