Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Nov 2010 01:45:21 -0800
From:      Stanislav Sedov <stas@FreeBSD.org>
To:        Joel Ray Holveck <joelh@piquan.org>
Cc:        ruby@freebsd.org, shoesoft@gmx.net, tobiash@gmail.com, wtp@bsdserwis.com
Subject:   Re: [FIX] portupgrade fails if BEFOREDEINSTALL is set
Message-ID:  <20101121014521.5a519010.stas@FreeBSD.org>
In-Reply-To: <9FA7F784-CA43-4E6B-8EA0-EE89D27DCE3A@piquan.org>
References:  <9FA7F784-CA43-4E6B-8EA0-EE89D27DCE3A@piquan.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Sun__21_Nov_2010_01_45_21_-0800_WXnenjxLUPPZgA1n
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, 20 Nov 2010 01:33:22 -0800
Joel Ray Holveck <joelh@piquan.org> mentioned:

> In pkg_deinstall, in get_beforedeinstall_command, there's a line:
>=20
>   commands.each { |cmd| cmd.sub!(/^[;\s]+/, '') if !cmd.nil }
>=20
> 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 .co=
nf file's comments returns a command for all packages, although it frequent=
ly is an empty string.)
>=20
> 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 portupgr=
ade will build but during the deinstall will stop working on that package w=
ith no clear error message, and the reason given in the "why the upgrades f=
ailed" 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.)
>=20
> 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.
>=20
> Please copy me on all replies, since I'm not on the list.

Thanks a lot for the patch, I'll look into this soon.
Sorry for delay, I was busy with my $dayjob.
Thanks!

--=20
Stanislav Sedov
ST4096-RIPE

()  ascii ribbon campaign - against html e-mail=20
/\  www.asciiribbon.org   - against proprietary attachments

--Signature=_Sun__21_Nov_2010_01_45_21_-0800_WXnenjxLUPPZgA1n
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----

iQIcBAEBAgAGBQJM6OoxAAoJEL8lojEJL9nwYToP/3sZB0TEkKQqdMVEsTDL2zR3
U61W7jgL0oc13AB96x/u9jKf1I8Jn6OvYmJBRYzbhaPPnpygdT5ZcmiG1eUtMvA2
xf1orQe/Ch9Ml1nif1prK8RORhgd6aN3MEsSA7CahtUvwdgfpYHu9qfN7HVbVAmr
WoyX/MOePUD+oqAu/c15T14c7AhGejJLqWiVS5fanXLLZUJY41MZnNMmCtL72sLY
49VY8YuZA0xXCsa0Igla9Rplob+G8yHQ1LHVZzzvY/A19d1Yl1OUpAAo4E16Zwmt
tOp+ixsXUPB76JlH1iqUsE1iEHypcyWyrB5FWTWRnf7aIXbUGZ7pQH74A2pWyCoJ
pXMMeX01d0Q7KXjl3aNZQsME3qcfTlgdwxh/cTD4n7YLqC2LbRvrHoIjPQiTq/eT
bbxinO72Ojq8gJ0I9N0BD+Jf9oJzFrs52hjJ5/Z+libuBWiqbdzClroiZNp19NPv
pIcEd8y1CLW6diGFTyDcDV1eIdz7sdIYn7wfegGlTRfCZH0gF5Mt5K9vtCiVKR1p
/ppIFj8NFnxvRMYNsUAPuXe/oI5+ywA+eKM6kiY/Z8b/Ua4TovR5IsUjjU6RQfzT
TjWSV7LOE6AY2zexJYzBTYV/mJrJihPk5fEB5jdSSCHGMYjTQp24xb+XzE03qCW1
uO4pytritE9heTfGiXRn
=BvDy
-----END PGP SIGNATURE-----

--Signature=_Sun__21_Nov_2010_01_45_21_-0800_WXnenjxLUPPZgA1n--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101121014521.5a519010.stas>