Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jun 2012 18:33:45 -0500
From:      Scott Lambert <lambert@lambertfam.org>
To:        ports@freebsd.org
Subject:   Re: painful process.. php53/etc
Message-ID:  <20120622233345.GJ8651@netmon.tcworks.net>
In-Reply-To: <op.wgbb92c034t2sn@tech304>
References:  <4FE48696.2020601@FreeBSD.org> <CAN6yY1sxfD5hyKXMis%2BjnV%2BSJj3KFrqCHF1o1MyCUPZtGdvOpQ@mail.gmail.com> <4FE49AD4.6050901@FreeBSD.org> <4FE49BD3.2010803@shatow.net> <op.wgbb92c034t2sn@tech304>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 22, 2012 at 11:33:28AM -0500, Mark Felder wrote:
> On Fri, 22 Jun 2012 11:22:43 -0500, Bryan Drewery <bryan@shatow.net> wrote:
> >
> > Does that actually work though?
> > Somehow it seems too simple given this discussion continues to come up
> > with various /var/db/pkg hacks.
> 
> This will NOT work. I've tried it before. Every time you do a portmaster  
> -a it will try to upgrade all the modules to php 5.4 versions which will  
> fail miserably because you have php53 installed.


This is how I dealt with it when I needed to install one new php
5.3 module.  There is probably a better way, but it worked for me.

The installed version of PHP was a couple of minor revisions back.

First backup /var/db/pkg somehow.

cd /var/db/pkg;
sudo sed -i.bak -E -e 's|(^@comment (DEP)?ORIGIN:([^/]+/php5))(-.+)?|\13\4|1' */+CONTENTS;

Seems to work for pkg_info.

Portmaster needed a little assist.

When I just ran "portmaster php5\* ", something kept trying to
install php54.  So I got a list of outdated php 5.3 ports and brought
them up.

/usr/sbin/pkg_version -v -L '=' | /usr/bin/tee ~/portversion.log ;

sudo portmaster php5-5.3\*;
sudo portmaster `cut -d " " -f1 ~/portversion.log | grep php5 | grep -v php5-extensions ` ;

# Then you can upgrade php5-extensions.
sudo portmaster php5-extensions ;

sudo portmaster pear\* ; # just for good measure

-- 
Scott Lambert                    KC5MLE                       Unix SysAdmin
lambert@lambertfam.org




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