+ portsdb -u
portsdb: uninitialized constant PkgDBTools::DBError
++ exit 1
++ exit 1
Fixed as of newer portupgrade and tools portupgrade depends on.
not fixed, getting myself on a 11.1 system.
Portupgrade crashed 80% through a rebuild all ports task, didnt show what was done so I got no idea what progress was made, and now generates this when rerunning it, even with just -h argument.
/usr/local/lib/ruby/site_ruby/2.4/pkgtools/pkgdbtools.rb:104:in `rescue in db_driver=': uninitialized constant PkgDBTools::DBError (NameError)
from /usr/local/lib/ruby/site_ruby/2.4/pkgtools/pkgdbtools.rb:63:in `db_driver='
from /usr/local/lib/ruby/site_ruby/2.4/pkgtools/portsdb.rb:168:in `setup'
from /usr/local/lib/ruby/site_ruby/2.4/pkgtools/pkgtools.rb:242:in `init_pkgtools_global'
from /usr/local/sbin/portupgrade:531:in `block in main'
from /usr/local/lib/ruby/2.4/optparse.rb:1062:in `initialize'
from /usr/local/sbin/portupgrade:238:in `new'
from /usr/local/sbin/portupgrade:238:in `main'
from /usr/local/sbin/portupgrade:2380:in `<main>'
Sadly portupgrade seems to be problematic with its db unresolved issues for years, with the main dev not active responding to issue reports, but portmaster is poor feature wise. So I keep using it.
Any idea how to fix this one?
I already recompiled ruby, ruby-dbd and portupgrade.
I'll take another look sometime.
Still broken, on 26 servers currently.
But working on another 42 servers, I dont know what triggers it as all the servers are configured equally, just different hardware, some of the servers it originally worked but then breaks after a portupgrade crash.
Doesnt matter what ruby version is used or if portupgrade vs portupgrade-devel port.
Only flag set in make.conf is cputype.
I'm having this now as well -- the problem started appearing in the middle of a portupgrade run. Using portupgrade-devel-20180309 thus:
portupgrade -v -a -rR --config
I tie this to the upgrade of ruby24-bdb to ruby25-bdb, which portugprade itself has executed:
Apr 24 21:05:52 kachka pkg-static: ruby-2.5.5_1,1 installed
Apr 24 21:08:21 kachka pkg: ruby24-bdb-0.6.6_5 deinstalled
Apr 24 21:08:23 kachka pkg-static: ruby25-bdb-0.6.6_6 installed
After reinstalling portupgrade -- which switched the Ruby scripts from $PREFIX/bin/ruby to $PREFIX/bin/ruby25 -- things began to work again...
I'd say, portupgrade should implement special handling for when it upgrades itself OR any of the components it uses (ruby, ruby-bdb, etc.)
I finally did resolve it but since there was no interest shown developer side I didnt post the followup.
In my case it was caused by something ruby side not liking hardening compile flags so ssp-buffer-size=4 and stack protector.
I had to remove from both ruby and ruby-bdb then it works as expected.
Really there needs to be some kind of built in diagnosis which would indicate the problem. Nothing was actually visibly crashing so all seemed fine, but clearly something internally must have failed as it silently fell back to the other database type.
As to the flags I used I know they non default, but I would expect these days the vast majority of software to handle them, as is standard on many OS to use those flags now, FreeBSD is one of the few remaining hold outs.
I do feel I remember testing this on a empty make.conf, or at least with only cputype set, but I guess I am wrong given what I found to be the solution or maybe when I tested it, it was never with both ruby and ruby-bdb at the same time because they are both required to not have those flags not just one or the other.