# Automatically replacing a dependent port



## mix_room (Sep 14, 2010)

I have www/lighttpd installed as on a machine, but no apache.  
Quite often when I attempt to upgrade or install new software www/apache22 is installed. lang/php5 being one such port that installs apache.

I seem to remember reading that it is possible to tell the ports system that all dependencies for a certain port shall be rewritten to another one. I can not however remember where this should be done. 

I can ofcourse manually deinstall www/apache22 and then run `# pkgdb -F`, but it seems unnecessary.


----------



## DutchDaemon (Sep 14, 2010)

Maybe experiment with the -o flag of portupgrade(1)? Seems like atypical usage of that flag, but who knows.


----------



## SirDice (Sep 14, 2010)

Try setting *APACHE_PORT=www/lighttpd* in /etc/make.conf.


----------



## mix_room (Sep 15, 2010)

SirDice said:
			
		

> Try setting *APACHE_PORT=www/lighttpd* in /etc/make.conf.



That sounds like what I had in mind.


----------

