Updating packages with portupgrade

hi

I have a FAMP on my VPS and am trying to upgrade installed packages (PHP, MySQL & Apache); since some of them are getting a little older. I've chosen the portupgrade utility since the manual recommends this.

With portupgrade installed succesfully, upon:

# portupgrade -a

I receive:

Code:
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
	! www/php5-session (php5-session-5.3.11)	(compiler error)
	! databases/php5-mysql (php5-mysql-5.3.11)	(missing header)
	! databases/php5-mysqli (php5-mysqli-5.3.11)	(missing header)



The majority of my packages are now updated successfully, but the most important, namely the above are not! That is, I'm still on PHP 5.3






What's the problem?
 
Always, yes always, read /usr/ports/UPDATING before blindly running portupgrade or portmaster -a.
 
Dies_Irae said:
Have you updated the ports tree prior to run portupgrade(1)?

# portsnap fetch update

Hi

I originally did a
# portsnap update

but since you point out

# portsnap fetch update

I've since used your command. But still after running:

# portupgrade -a


I receive:


Code:
Stop in /usr/ports/www/php5-session.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20120708-9098-1vp3m2m-0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=php5-session-5.3.11 UPGRADE_PORT_VER=5.3.11 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
	! databases/php5-mysqli (php5-mysqli-5.3.11)	(missing header)
	! databases/php5-mysql (php5-mysql-5.3.11)	(missing header)
	! www/php5-session (php5-session-5.3.11)	(compiler error)



I don't understand?
 
wblock@ said:
Always, yes always, read /usr/ports/UPDATING before blindly running portupgrade or portmaster -a.

hi

Indeed, http://www.freshports.org/lang/php5/ was one of the first documents I looked at:

These upgrade notes are taken from /usr/ports/UPDATING

2012-05-16

Affects: users of lang/php5

Author: ale@FreeBSD.org

Reason:
PHP has been updated to 5.4. Suhosin patch has been disabled until the
new version will be released (soon). Suhosing extension will take more
time. LINKTHR option is now enabled by default, be sure to flag it if
you are updating using an old saved configuration. sqlite2 extension
has been permanently removed.
If you want to remain at PHP 5.3, a new port (lang/php53) has been
created for such purpose.


I don't see any issues, or am I missing something?
 
Things go from bad to worse:


On one of my virtual domains I browse to http://mydomain.com and all I see is

"Error establishing a database connection". Further more, at the shell:


# mysql -u root -p
Code:
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Running
Code:
<?php phpinfo(); ?>
under the above domain reports that mysqli support is active.



I haven't lost anything important thankfully, but sure am learning the hard way fast...

Am I going to have to start re-installing mysql packages?
 
All the error messages you have provided tell us "something went wrong". Near the end of the output will be the actual error message.

Look back until you can find the first error. Provide us with that, and we might have a chance. It is probably a case of an incorrectly installed port or a missing file, but we need more info.
 
OK, steps I've taken.

I've remove packages:

Code:
php5-mysql-5.3.11                   <   needs updating (port has 5.4.4)
php5-mysqli-5.3.11                  <   needs updating (port has 5.4.4)
php5-session-5.3.11                 <   needs updating (port has 5.4.4)

And the "Error establishing a database connection" is no longer. Obviously since I've deleted the database.



My ports tree is up-to-date. Focusing on PHP for a moment:

# pkg_version -v reports

Code:
php53-5.3.14                        =   up-to-date with port

but the most up-to-date version of PHP is 5.4?

I try

# portupgrade -R php53-5.3.14
Code:
[Gathering depends for lang/php53 ....................... done]
[Exclude up-to-date packages ............. done]

but after running # pkg_version -v

I'm still seeing

Code:
php53-5.3.14                        =   up-to-date with port

I'm expecting to see an entry for php54?
 
wblock@ said:
Reread the portupgrade man page. -R means rebuild everything that this port depends on.

Thanks

My steps:

Ports tree is up-to-date.


# portupgrade -a

Reports no errors - in fact returns me back to the prompt so am assuming everythings OK.
# pkg_version -v

Returns:

Code:
php53-5.3.14                        =   up-to-date with port
Should this not now be php54?
 
c00kie said:
# pkg_version -v

Returns:

Code:
php53-5.3.14                        =   up-to-date with port
Should this not now be php54?

No:
Code:
% ls -d /usr/ports/lang/php5*
/usr/ports/lang/php5
/usr/ports/lang/php5-extensions
/usr/ports/lang/php52
/usr/ports/lang/php52-extensions
/usr/ports/lang/php53
/usr/ports/lang/php53-extensions

PHP 5.4 is a different port, lang/php5. So you have the latest version of lang/php53. To switch to the main port, use the -o option to portupgrade or portmaster. (Untested, there may be other complications in dependent ports.)
 
thanks.

Now

# portupgrade -o php5-5.3.8
Reveals:
Code:
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 34 packages found (-1 +2) (...).. done]
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 23751 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000.........17000.........18000.........19000.........20000.........21000.........22000.........23000....... ..... done]
** Port directory not found: php5-5.3.8
** Listing the failed packages (-:ignored / *:skipped / !:failed)
	- php5-5.3.8 (port directory error)

But from # pkg_info

Code:
php53-5.3.14        PHP Scripting Language

What is a port directory error?
 
Back
Top