Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Oct 2014 21:02:14 -0500
From:      "Matthew D. Fuller" <fullermd@over-yonder.net>
To:        Mathieu Arnold <mat@FreeBSD.org>
Cc:        Jakob Breivik Grimstveit <jakob@grimstveit.no>, FreeBSD Ports mailing list <freebsd-ports@freebsd.org>
Subject:   Re: Update php from 5.5 to 5.6?
Message-ID:  <20141011020214.GO2161@over-yonder.net>
In-Reply-To: <3C4C0CFF6D399497F81258DF@atuin.in.mat.cc>
References:  <CAFVH1KXJy%2BLicdp-qe60BAg8iEpm6%2Bh-LtNz7wrOCjNXqXLSXw@mail.gmail.com> <3C4C0CFF6D399497F81258DF@atuin.in.mat.cc>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 10, 2014 at 11:37:24AM +0200 I heard the voice of
Mathieu Arnold, and lo! it spake thus:
> 
> Easiest way to do it would be to remove php55-* and mod_php55-xxx
> and install their php56-* and mod_php56-xxx equivalents.

Pre-pkgng, I did it via creepy magic sed'ery in /var/db/pkg; change
the origins, then a regular portupgrade/portmaster will see the newer
versions and run with it.  Post-pkgng, we can just use pkg set to
avoid some of the creepery.

I did the 55->56 on a machine about a month ago, and came up with the
below.  It just spits out the commands, then I can eyeball to be sure
they're right and C&P into a term.  Then check the 'pkg version',
should show all of them needing upgrades to 5.6.x.

-----8<------
#!/usr/bin/env perl
use strict;
use warnings;

# pkg query '%o' | grep php55 | $SELF

while(<STDIN>)
{
	chomp;
	my $old = $_;
	(my $new = $_) =~ s/55/56/;

	die "Couldn't find dir $new" unless -d "/usr/ports/$new";

	print "pkg set -yo $old:$new\n";
}
-----8<------



-- 
Matthew Fuller     (MF4839)   |  fullermd@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.



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