Bug 119074

Summary: portupgrade www/eaccelerator install order problem
Product: Ports & Packages Reporter: kevin
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description kevin 2007-12-27 20:00:07 UTC
When doing a "portupgrade -af" when you have lang/php5 and www/eaccelerator installed, sometimes you end up with the order of modules in /usr/local/lib/php/extensions.ini wrong.

In extensions.ini, eaccelerator.so must appear after session.so. Normally when doing a "make install" in www/eaccelerator, it's ensured that php5-session is installed before eaccelerator can be, so the order in extensions.ini is correct.

However, after doing a portupgrade, each line in extensions.ini is deleted (after each extension is temporarily deinstalled) then appended back at the bottom when it is reinstalled. If eaccelerator gets rebuilt before lang/php5-extensions, it bubbles up to the top of extensions.ini causing php to break because eaccelerator has a dependancy on symbols that session.so exports.

Fix: 

The workaround is to manually edit extensions.ini to move eaccelerator back to the bottom, but I don't have a deep enough understanding of how ports dependancies are tracked within portupgrade to tell it to rebuild eaccelerator after rebuilding php5-session.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-12-28 02:14:04 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2007-12-28 06:39:38 UTC
State Changed
From-To: open->closed

It's recommended to rebuild all php extensions when updating php. 
Try with portupgrade -R php5 next time.
Comment 3 kevin 2007-12-28 07:10:55 UTC
Just to make sure we're both understanding each other...

I'm talking about doing a "portupgrade -af" (force rebuilding of ALL  
ports), and the resulting mess that occurs because portupgrade  
sometimes chooses the wrong order to do things when given the "-af"  
option.

To start with, assume /usr/local/lib/php/extensions.ini has just:

session.so
eaccelerator.so

I do "portupgrade -af", which should rebuild all the ports in the  
system. Portupgrade seems sometimes(but not always) to want to do  
things in this order:

Rebuild lang/php5
Rebuild www/eaccelerator - which deletes and appends "eaccelerator.so"  
to the bottom of extensions.ini
Rebuild www/php5-session - which deletes and appends "session.so" to  
the bottom of extensions.ini

This results in extensions.ini containing:

eaccelerator.so
session.so

Which causes php to break. I think either portupgrade needs to be told  
that eaccelerator has a dependancy on php5-session OR the code that  
automatically adds lines to extensions.ini needs to learn about the  
order dependancies.


Is that clearer, or am I misunderstanding something myself?
Comment 4 Alex Dupre freebsd_committer freebsd_triage 2007-12-28 07:22:17 UTC
Kevin - Your.Org wrote:
> 
> Which causes php to break. I think either portupgrade needs to be told
> that eaccelerator has a dependancy on php5-session OR the code that
> automatically adds lines to extensions.ini needs to learn about the
> order dependancies.
> 
> Is that clearer, or am I misunderstanding something myself?

It's correct. And eaccelerator *depends* on php-session, so portupgrade
*should* do the correct thing (but obviously does't).

--
Alex Dupre