Comment 6 for bug 1979128

Revision history for this message
Mitsuya Shibata (cosmos-door) wrote :

I verified, it is ok. Thanks for updating!

root@sdbm:~# apt install -y ruby-sdbm
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package ruby-sdbm
root@sdbm:~# cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
# Enable Ubuntu proposed archive
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe
EOF
root@sdbm:~# cat <<EOF >/etc/apt/preferences.d/proposed-updates
# Configure apt to allow selective installs of packages from proposed
Package: *
Pin: release a=$(lsb_release -cs)-proposed
Pin-Priority: 400
EOF
root@sdbm:~# apt update
(snip)
root@sdbm:~# apt policy ruby-sdbm
ruby-sdbm:
  Installed: (none)
  Candidate: 1.0.0-2~ubuntu0.22.04.1
  Version table:
     1.0.0-2~ubuntu0.22.04.1 400
        400 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 Packages
root@sdbm:~# apt install ruby-sdbm
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  fonts-lato javascript-common libjs-jquery libruby3.0 rake ruby ruby-net-telnet ruby-rubygems ruby-webrick ruby-xmlrpc ruby3.0 rubygems-integration unzip zip
Suggested packages:
  apache2 | lighttpd | httpd ri ruby-dev bundler
The following NEW packages will be installed:
  fonts-lato javascript-common libjs-jquery libruby3.0 rake ruby ruby-net-telnet ruby-rubygems ruby-sdbm ruby-webrick ruby-xmlrpc ruby3.0 rubygems-integration unzip zip
0 upgraded, 15 newly installed, 0 to remove and 1 not upgraded.
(snip)

root@sdbm:~# ruby -e "require 'sdbm'; SDBM.open 'my_database' do |db| db.update('foo' => 'bar') end"

---

And it seems that bsfilter will work with manually installed ruby-sdbm package.

root@sdbm:~# apt install bsfilter
root@sdbm:~# bsfilter --sub-clean --add-spam --insert-flag --insert-probability --update foo
/usr/bin/bsfilter:326:in `open_ro': foo is not file (RuntimeError)
        from /usr/bin/bsfilter:2311:in `block in update_token_dbs'
        from /usr/bin/bsfilter:2310:in `each'
        from /usr/bin/bsfilter:2310:in `update_token_dbs'
        from /usr/bin/bsfilter:3336:in `run'
        from /usr/bin/bsfilter:3414:in `<main>'

root@sdbm:~# apt remove ruby-sdbm
root@sdbm:~# bsfilter --sub-clean --add-spam --insert-flag --insert-probability --update foo
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- sdbm (LoadError)
Did you mean? dbm
        from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /usr/bin/bsfilter:3106:in `get_options'
        from /usr/bin/bsfilter:3262:in `setup'
        from /usr/bin/bsfilter:3413:in `<main>'

---