ports/125936: portupgrade -R fails if BUILD_DEP's are not installed.
mschout at gkg.net
Thu Jul 24 16:20:04 UTC 2008
>Synopsis: portupgrade -R fails if BUILD_DEP's are not installed.
>Arrival-Date: Thu Jul 24 16:20:03 UTC 2008
>Originator: Michael Schout
>Release: FreeBSD 6.2-RELEASE-p5 i386
System: FreeBSD bu1.gkg.net 6.2-RELEASE-p5 FreeBSD 6.2-RELEASE-p5 #0: Fri Jun 29 23:27:37 CDT 2007 mschout at bu1.gkg.net:/usr/obj/usr/src/sys/GKGGENERIC-SMP i386
If any BUILD_DEP's of a package have been removed, running portupgrade -R pkgname will fail
with an exception. For example, if postgresql74-server is built, it has BUILD_DEP's that include
bison and m4. If you then remove bison and m4 (because they are not runtime dependencies), then later
try to portupgrade -R postgresql-server, then portupgrade fails like this:
[Gathering depends for databases/postgresql74-server ... done]
[Exclude up-to-date packages ...... done]
/usr/local/lib/ruby/site_ruby/1.8/pkginfo.rb:74:in `initialize': : Not in due form: <name>-<version> (ArgumentError)
from /usr/local/sbin/portupgrade:931:in `new'
from /usr/local/sbin/portupgrade:931:in `do_upgrade'
from /usr/local/sbin/portupgrade:815:in `main'
from /usr/local/sbin/portupgrade:811:in `each'
from /usr/local/sbin/portupgrade:811:in `main'
from /usr/local/lib/ruby/1.8/optparse.rb:785:in `initialize'
from /usr/local/sbin/portupgrade:229:in `new'
from /usr/local/sbin/portupgrade:229:in `main'
This error is raised because of this section in portupgrade:
if $upward_recursive || $config
dep = 
get_all_depends(origin).each do |d|
dep << $pkgdb.deorigin(d).to_s
depends |= dep if $upward_recursive
The problem is that $pkgdb.deorigin(d).to_s returns an empty string if the dependency is not
installed, which means you end up with a blank entry in the "depends" array.
Build any port that has BUILD_DEP's, then uninstall one or more of the BUILD_DEP's,
and do portupgrade -Rf portname
Probably add the missing build deps to the install tasks.
More information about the freebsd-ports-bugs