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' from /usr/local/sbin/portupgrade:2208 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 end depends |= dep if $upward_recursive end 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. Fix: Probably add the missing build deps to the install tasks. How-To-Repeat: Build any port that has BUILD_DEP's, then uninstall one or more of the BUILD_DEP's, and do portupgrade -Rf portname
Responsible Changed From-To: freebsd-ports-bugs->sem Over to maintainer (via the GNATS Auto Assign Tool)
Thanks. Unfortunately this patch does not work for 2 reasons. 1: I think you meant to use upgrade_tasks.compact! which is the in-place form of the compact() method. However, even using the in place form fails because: 2: compact only removes nil's, not empty strings. Here is a modified patch that works for me: @@ -928,6 +930,9 @@ end def do_upgrade(pkgname) + if pkgname.nil? or pkgname.empty? + return; + end pkg = PkgInfo.new(pkgname) origin = $task_options[pkgname][:origin]
I ran into this issue myself this week. I think this could even be possible if the new version of an installed port has a new dependency. My patch simply ignores the bad value from deorigin and has worked just fine: - dep << $pkgdb.deorigin(d).to_s + dep_origin = $pkgdb.deorigin(d).to_s + dep << dep_origin if dep_origin != '' Bryan
Responsible Changed From-To: sem->ruby sem@ has turned over maintainership of portupgrade to the ruby mailing list.
Hello, guys! Sorry for delay in processing of this PR! I wonder if this problem is still relevant? I seem to unable to reproduce this issue :-( Have you figured out any strightforward way to repdoduce this? Thanks! -- Stanislav Sedov ST4096-RIPE
Try force deleting a build dependency, like libtool, then portupgrading a port which needs it. Bryan Stanislav Sedov wrote: > Hello, guys! > > Sorry for delay in processing of this PR! > I wonder if this problem is still relevant? > I seem to unable to reproduce this issue :-( > Have you figured out any strightforward way > to repdoduce this? > > Thanks! > >
stas 2009-10-27 14:59:37 UTC FreeBSD projects repository Modified files: pkgtools/bin portupgrade Log: - Do not try to update dependency if it is not installed. Several people reported failures that may be related to this. PR: ports/125936 (possibly) Revision Changes Path 1.63 +4 -1 projects/pkgtools/bin/portupgrade _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
On Tue, 27 Oct 2009 09:57:21 -0500 Bryan Drewery <bryan@shatow.net> mentioned: > Try force deleting a build dependency, like libtool, then portupgrading > a port which needs it. > Yeah, I tried that but I can't reproduce the failure. Anyway, I committed the patch just now that may be able to fix this problem. If you can reproduce this can you, plese, test the patch attached? Thanks! --- bin/portupgrade 26 Oct 2009 14:47:49 -0000 1.62 +++ bin/portupgrade 27 Oct 2009 14:59:37 -0000 1.63 @@ -631,7 +631,10 @@ if $upward_recursive || $config dep = [] get_all_depends(origin).each do |d| - dep << $pkgdb.deorigin(d).to_s + newdep = $pkgdb.deorigin(d) + unless newdep.nil? then + dep << newdep.to_s + end end depends |= dep if $upward_recursive end -- Stanislav Sedov ST4096-RIPE
Responsible Changed From-To: ruby->pgollucci I will take it
Responsible Changed From-To: pgollucci->freebsd-ports-bugs going to have enotime for the next 2 weeks, sorry
Responsible Changed From-To: freebsd-ports-bugs->ruby Over to maintainer(s).
Looks like the latest release has fixed this in the code, so this PR can probably be closed. > get_all_depends(origin).each do |d| > newdep = $pkgdb.deorigin(d) > unless newdep.nil? then > dep << newdep.to_s > end > end Bryan Drewery
State Changed From-To: open->closed Bryan reports that this issue is fixed with the latest release