pkg_add fixing dependencies

Anders Nore andenore at freebsd.org
Tue Jul 15 11:58:37 UTC 2008


Hello everyone, I'm working on pkg_install during GSoC to help improve it,  
and there's one thing I've come across that I'm uncertain is the best  
behaviour, and it's best shown with an example:

Installed packages:
firefox-3.0_2,1
zip-2.32

With these packages installed firefox3 has a dependency on zip-2.32 so:

duckjen# pkg_delete zip-2.32
pkg_delete: package 'zip-2.32' is required by these other packages
and may not be deinstalled:
firefox-3.0_2,1

this is OK, but i can pkg_delete -f and it will delete it. And running

duckjen# pkg_delete -f zip-2.32
pkg_delete: package 'zip-2.32' is required by these other packages
and may not be deinstalled (but I'll delete it anyway):
firefox-3.0_2,1
duckjen# pkg_add -r zip

After adding zip again it will not have +REQUIRED_BY with the firefox3  
entry, but firefox3 will still have the dependency on zip. Thus leaving it  
unconsistent.

This can be checked with:

> pkg_info -r firefox-3.0_2,1
> pkg_info -R zip-2.32


So my question is, shouldn't "pkg_add -r zip" check installed packages for  
dependencies and make a correct +REQUIRED_BY file for zip? I know that  
portupgrade and portmaster does this.



Anders Nore


More information about the freebsd-ports mailing list