From owner-freebsd-ruby@FreeBSD.ORG  Fri Nov 27 11:21:40 2009
Return-Path: <owner-freebsd-ruby@FreeBSD.ORG>
Delivered-To: ruby@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EE3CD106568B
	for <ruby@FreeBSD.org>; Fri, 27 Nov 2009 11:21:39 +0000 (UTC)
	(envelope-from roberto@keltia.freenix.fr)
Received: from keltia.freenix.fr (keltia.freenix.org
	[IPv6:2001:660:330f:f820:213:72ff:fe15:f44])
	by mx1.freebsd.org (Postfix) with ESMTP id 8D2378FC15
	for <ruby@FreeBSD.org>; Fri, 27 Nov 2009 11:21:39 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by keltia.freenix.fr (Postfix/TLS) with ESMTP id 442DB3C4D5
	for <ruby@FreeBSD.org>; Fri, 27 Nov 2009 12:21:38 +0100 (CET)
X-Virus-Scanned: amavisd-new at keltia.freenix.fr
Received: from keltia.freenix.fr ([127.0.0.1])
	by localhost (keltia.freenix.fr [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 4b0pKUbPL3Wq for <ruby@FreeBSD.org>;
	Fri, 27 Nov 2009 12:21:37 +0100 (CET)
Received: from roberto-al.eurocontrol.fr (aran.keltia.net [88.191.250.24])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested) (Authenticated sender: roberto)
	by keltia.freenix.fr (Postfix/TLS) with ESMTPSA id 87AAA39C08
	for <ruby@FreeBSD.org>; Fri, 27 Nov 2009 12:21:37 +0100 (CET)
Date: Fri, 27 Nov 2009 12:21:10 +0100
From: Ollivier Robert <roberto@keltia.freenix.fr>
To: ruby@FreeBSD.org
Message-ID: <20091127112110.GB69383@roberto-al.eurocontrol.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
X-Operating-System: MacOS X / Macbook Pro - FreeBSD 7.2 / Dell D820 SMP
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: 
Subject: Error with current portupgrade-devel
X-BeenThere: freebsd-ruby@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: FreeBSD-specific Ruby discussions <freebsd-ruby.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ruby>,
	<mailto:freebsd-ruby-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-ruby>
List-Post: <mailto:freebsd-ruby@freebsd.org>
List-Help: <mailto:freebsd-ruby-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-ruby>,
	<mailto:freebsd-ruby-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Nov 2009 11:21:40 -0000

Hello,

I'm using portupgrade from pktools-20091029 and I've hit a bug which seems to me a rather obvious bug.

590 [11:59] root@ng:ports/net# portinstall avahi
[Gathering depends for net/avahi ............./usr/local/sbin/portinstall:878:in `get_all_depends': private method `scan' called for #<Set: {}> (NoMethodError)
         from /usr/local/sbin/portinstall:871:in `get_all_depends'
         from /usr/local/lib/ruby/1.8/set.rb:195:in `each'
         from /usr/local/lib/ruby/1.8/set.rb:195:in `each_key'
         from /usr/local/lib/ruby/1.8/set.rb:195:in `each'
         from /usr/local/sbin/portinstall:870:in `get_all_depends'
         from /usr/local/sbin/portinstall:871:in `get_all_depends'
         from /usr/local/lib/ruby/1.8/set.rb:195:in `each'
         from /usr/local/lib/ruby/1.8/set.rb:195:in `each_key'
         from /usr/local/lib/ruby/1.8/set.rb:195:in `each'
         from /usr/local/sbin/portinstall:870:in `get_all_depends'
         from /usr/local/sbin/portinstall:887:in `get_notinstalled_depends'
         from /usr/local/sbin/portinstall:773:in `main'
         from /usr/local/sbin/portinstall:751:in `each'
         from /usr/local/sbin/portinstall:751:in `main'
         from /usr/local/lib/ruby/1.8/optparse.rb:1310:in `call'
         from /usr/local/lib/ruby/1.8/optparse.rb:1310:in `parse_in_order'
         from /usr/local/lib/ruby/1.8/optparse.rb:1306:in `catch'
         from /usr/local/lib/ruby/1.8/optparse.rb:1306:in `parse_in_order'
         from /usr/local/lib/ruby/1.8/optparse.rb:1254:in `catch'
         from /usr/local/lib/ruby/1.8/optparse.rb:1254:in `parse_in_order'
         from /usr/local/lib/ruby/1.8/optparse.rb:1248:in `order!'
         from /usr/local/lib/ruby/1.8/optparse.rb:1241:in `order'
         from /usr/local/sbin/portinstall:559:in `main'
         from /usr/local/lib/ruby/1.8/optparse.rb:791:in `initialize'
         from /usr/local/sbin/portinstall:231:in `new'
         from /usr/local/sbin/portinstall:231:in `main'
         from /usr/local/sbin/portinstall:2213

Problem is, there is no #scan method in the Set class.

869     children_deps = Set.new
870     depends.each do |dep|
871       children_deps.merge(get_all_depends(dep, parents_list)) if !dep.nil?
872     end
873     if !children_deps.nil?
874       depends.merge(children_deps)
875     end
876
877     STDERR.puts ' done]' if first
878     $depends[origin] = depends.scan(/.*\n/).compact			<<<<<<<
879   else
880     $depends[origin]
881   end
882 end

I'll trace it to see what exactly could be in depends and see what it is supposed to achieve.  But am I the only one with this?

Cheers,

-- 
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr
In memoriam to Ondine : http://ondine.keltia.net/