From owner-freebsd-ruby@FreeBSD.ORG Sat Nov 20 10:09:39 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 A6683106564A for ; Sat, 20 Nov 2010 10:09:39 +0000 (UTC) (envelope-from joelh@piquan.org) Received: from thor.piquan.org (thor.piquan.org [64.81.48.72]) by mx1.freebsd.org (Postfix) with ESMTP id 60A6A8FC14 for ; Sat, 20 Nov 2010 10:09:39 +0000 (UTC) Received: from frigg.pvt.piquan.org (frigg.pvt.piquan.org [192.168.13.22]) (authenticated bits=0) by thor.piquan.org (8.14.4/8.14.4) with ESMTP id oAK9XM4O053550 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 20 Nov 2010 01:33:22 -0800 (PST) (envelope-from joelh@piquan.org) From: Joel Ray Holveck Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/signed; boundary=Apple-Mail-6-553273615; protocol="application/pkcs7-signature"; micalg=sha1 Date: Sat, 20 Nov 2010 01:33:22 -0800 To: ruby@freebsd.org Message-Id: <9FA7F784-CA43-4E6B-8EA0-EE89D27DCE3A@piquan.org> X-Mailer: Apple Mail (2.1082) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: wtp@bsdserwis.com, tobiash@gmail.com, shoesoft@gmx.net Subject: [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 10:09:39 -0000 --Apple-Mail-6-553273615 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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.) 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. Please copy me on all replies, since I'm not on the list. Thanks, joelh= --Apple-Mail-6-553273615--