From owner-freebsd-ports@freebsd.org Sun Nov 29 02:53:51 2015 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 976A0A3496A for ; Sun, 29 Nov 2015 02:53:51 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from mail.infocus-llc.com (mail.infocus-llc.com [199.15.120.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75FCD1068 for ; Sun, 29 Nov 2015 02:53:50 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from draco.over-yonder.net (c-75-65-60-66.hsd1.ms.comcast.net [75.65.60.66]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.tarragon.infocus-llc.com (Postfix) with ESMTPSA id 3p7YvP1mFSzgK; Sat, 28 Nov 2015 20:45:05 -0600 (CST) Received: by draco.over-yonder.net (Postfix, from userid 100) id 3p7YvN4FYPz1jr; Sat, 28 Nov 2015 20:45:04 -0600 (CST) Date: Sat, 28 Nov 2015 20:45:04 -0600 From: "Matthew D. Fuller" To: Miroslav Lachman <000.fbsd@quip.cz> Cc: Carmel NY , FreeBSD Ports Subject: Re: update PHP Message-ID: <20151129024504.GW30248@over-yonder.net> References: <5659F096.7030200@quip.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5659F096.7030200@quip.cz> X-Editor: vi X-OS: FreeBSD X-Virus-Scanned: clamav-milter 0.98.7 at mail.tarragon.infocus-llc.com X-Virus-Status: Clean User-Agent: Mutt/1.5.24-fullermd.4 (2015-08-30) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 02:53:51 -0000 On Sat, Nov 28, 2015 at 07:21:10PM +0100 I heard the voice of Miroslav Lachman, and lo! it spake thus: > Carmel NY wrote on 11/27/2015 12:39: > > Would I l then need to rebuild everything that depends on PHP or could I just > > add the "-r" flag to portupgrade? > > You can get list of all origins of ports depending on main php port by > this command > > pkg query %o `pkg info -r php5 | tail -n +2` I've had good luck with PHP upgrades by just changing the origins, then rebuilding the php ports themselves. PECL stuff will also need a rebuild. Of course, you could just do a little sed'ery, but I tossed together a quickie .pl to do it with a little more seatbelts. e.g., with a little editing to pretend I'm going from 5.6 to 5.5: % pkg query '%o' | grep php56 | /tmp/phpup.pl pkg set -yo lang/php56:lang/php55 pkg set -yo archivers/php56-bz2:archivers/php55-bz2 pkg set -yo textproc/php56-ctype:textproc/php55-ctype pkg set -yo ftp/php56-curl:ftp/php55-curl [...] I intentionally just made it print out the 'pkg set's so I could eyeball them for sanity. Then just a quick C&P of 'em into a root terminal, and I'm off to the rebuilding races. A little obvious editing should let you do 5->56 with it. (of course there's always the chance of extensions moving around, so you may have to manually find and deal with one or two, but it makes it a lot easier) --------------8K------------------ #!/usr/bin/env perl use strict; use warnings; # pkg query '%o' | grep php56 | $SELF while() { chomp; my $old = $_; (my $new = $_) =~ s/56/55/; die "Couldn't find dir $new" unless -d "/usr/ports/$new"; print "pkg set -yo $old:$new\n"; } --------------8K------------------ -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream.