From owner-freebsd-ruby@FreeBSD.ORG Sat Nov 20 09:58:52 2010 Return-Path: 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 1A917106566C for ; Sat, 20 Nov 2010 09:58:52 +0000 (UTC) (envelope-from shoesoft@gmx.net) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by mx1.freebsd.org (Postfix) with SMTP id 6278F8FC0A for ; Sat, 20 Nov 2010 09:58:50 +0000 (UTC) Received: (qmail invoked by alias); 20 Nov 2010 09:58:49 -0000 Received: from 85-127-91-199.dynamic.xdsl-line.inode.at (EHLO walrus.pepperland) [85.127.91.199] by mail.gmx.net (mp008) with SMTP; 20 Nov 2010 10:58:49 +0100 X-Authenticated: #16703784 X-Provags-ID: V01U2FsdGVkX18ttv8uTLQttoMcXwPl1QO2ruGr6ciUorZwmDJaFK wMdAM/Gq0vKCzL From: Stefan Ehmann To: Joel Ray Holveck Date: Sat, 20 Nov 2010 10:58:47 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.1-RELEASE; KDE/4.5.3; i386; ; ) References: <9FA7F784-CA43-4E6B-8EA0-EE89D27DCE3A@piquan.org> In-Reply-To: <9FA7F784-CA43-4E6B-8EA0-EE89D27DCE3A@piquan.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201011201058.47097.shoesoft@gmx.net> X-Y-GMX-Trusted: 0 Cc: ruby@freebsd.org Subject: Re: [FIX] portupgrade fails if BEFOREDEINSTALL is set X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2010 09:58:52 -0000 On Saturday 20 November 2010 10:33:22 Joel Ray Holveck wrote: > In pkg_deinstall, in get_beforedeinstall_command, there's a line: > > commands.each { |cmd| cmd.sub!(/^[;\s]+/, '') if !cmd.nil } > > I'm kinda out of my area here, but I'm pretty sure that method should be > "nil?", not "nil". As it stands, portupgrade fails to upgrade anything if > BEFOREDEINSTALL in pkgtools.conf returns anything. (The example in the > .conf file's comments returns a command for all packages, although it > frequently is an empty string.) The fix seems to work for me. But ruby is also outside of my area. > I've seen a couple of references to this by searching on Google, but I'm > not aware of anybody having fixed it. The primary symptom is that > portupgrade will build but during the deinstall will stop working on that > package with no clear error message, and the reason given in the "why the > upgrades failed" summary is "undefined method `nil' for "":String". I've > seen people asking about this on freebsd-questions and freebsd-ruby, but > haven't really searched that hard. (I cc'd the people I saw asking about > it.) > > I'm sending this to ruby@freebsd.org because that's what's listed as the > maintainer for portupgrade; let me know if there's somewhere else it > should go. I don't subscribe to the ruby list, and I apologize if this > has been discussed here before. If the fix doesn't get picked up, a PR should be filed. So it doesn't get lost. Thanks, Stefan