painful process.. php53/etc

Scott Lambert lambert at lambertfam.org
Fri Jun 22 23:33:45 UTC 2012


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 at 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 at lambertfam.org



More information about the freebsd-ports mailing list