CONTENTS


Lastmodified 2024-03-07 (木) 11:38:49


portversion

Rubyのアップグレードに絡んで、portversionが動かなくなった。

# portversion -vl'<'
Traceback (most recent call last):
       8: from /usr/local/sbin/portversion:383:in `<main>'
       7: from /usr/local/sbin/portversion:84:in `main'
       6: from /usr/local/sbin/portversion:84:in `new'
       5: from /usr/local/lib/ruby/2.5/optparse.rb:1062:in `initialize'
       4: from /usr/local/sbin/portversion:191:in `block in main'
       3: from /usr/local/lib/ruby/site_ruby/2.5/pkgtools/pkgtools.rb:242:in `init_pkgtools_global'
       2: from /usr/local/lib/ruby/site_ruby/2.5/pkgtools/portsdb.rb:168:in `setup'
       1: from /usr/local/lib/ruby/site_ruby/2.5/pkgtools/pkgdbtools.rb:63:in `db_driver='
/usr/local/lib/ruby/site_ruby/2.5/pkgtools/pkgdbtools.rb:104:in `rescue in db_driver=':
uninitialized constant PkgDBTools::DBError (NameError)

だそうだ。

Ruby関連pkg は

ruby-2.6.6,1                   Object-oriented interpreted scripting language
ruby25-2.5.8,1                 Object-oriented interpreted scripting language
ruby26-bdb-0.6.6_8             Ruby interface to Oracle Berkeley DB revision 2 or later
ruby26-gems-3.0.6              Package management framework for the Ruby language
rubygem-rdoc-6.1.2_1        

と、なっている。??  なので25を消すと

# pkg info -r ruby25
ruby25-2.5.8,1:
# pkg delete ruby25-2.5.8,1
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
       ruby25: 2.5.8,1

Number of packages to be removed: 1

The operation will free 35 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling ruby25-2.5.8,1...
[1/1] Deleting files for ruby25-2.5.8,1: 100%
 
portversion -vl'<'
portversion: Command not found.

なので、portinstall portupgrade したら、portinstallも無いと・・・

cd /usr/ports/ports-mgmt/portupgrade
make install

したら、すでにはいっちょる。と、

make deinstall
make install clean

すると、こんどは、

3 # portversion -vl'<'
[Reading data from pkg(8) ... - 472 packages found - done]
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 32908 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000.........17000.........18000.........19000.........20000.........21000.........22000.........23000.........24000.........25000.........26000.........27000.........28000.........29000.........30000.........31000.........32000......... ..... done]

と動作しはじめた。OK?

pkg set -o lang/ruby25:lang/ruby26

portupgrade と ruby31-gems-3.4.20

に、バージョンアップがあるとのことで、portupgrade するも、旧バージョンがConfrict するエラー。

あれこれやって、結局以下で解決

 1116  16:10   cd /usr/ports/devel/ruby-gems
 1117  16:10   make reinstall  ==> error
 1118  16:11   make deinstall  ==> error
 1119  16:11   make install clean  ==> error
 1120  16:11   pkg delete ruby31-gems-3.4.20
 1121  16:12   make deinstall  ==> error
 1122  16:13   pkg delete ruby31-gems
 1123  16:13   make install clean
 1124  16:14   portversion -vl'<'  ==> OK
 1125  16:14   cd /usr/ports/ports-mgmt/portupgrade
 1126  16:14   make install clean  ==> error
 1127  16:17   make reinstall  ==> OK
 1128  16:17   portversion -vl'<'  ==> OK

Total access 1061:本日 2:昨日 0

Counter: 1061, today: 2, yesterday: 0

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS