broken pkgdb, missing optparse

tav tav at espians.com
Fri Jul 11 12:54:46 PDT 2003


rehi,

it seems that my package database is completely buggered. i am
experiencing similar problems as described in this recent thread @
http://www.mail-archive.com/freebsd-questions@freebsd.org/msg29734.html

i am not able to use ports as it constantly complains that the port is
already installed, e.g. when trying to install py-id3, i get:

  ===>  Installing for py22-id3-1.2
  ===>   py22-id3-1.2 depends on file: /usr/local/bin/python2.2 - found
  ===>   Generating temporary packing list
  ===>  Checking if audio/py-id3 already installed
  *** Error code 1

  Stop in /usr/ports/audio/py-id3.

but, as you can see from:

  $ pkg_info | grep "^py" | awk '{print $1}'

  py-MySQLdb-0.9.2
  py21-gdchart-0.6.1_1
  py21-imaging-1.1.3
  py21-tkinter-2.1.3
  py22-bsddb3-3.4.0_1
  py22-gdbm-2.2.1
  py22-gdchart-0.6.1_1
  py22-imaging-1.1.3
  py22-m2crypto-0.11_1
  py22-numeric-21.0
  py22-tkinter-2.2.1
  py22-xml-0.8.1
  python-2.1.3
  python-2.2.1
  python-2.2.3_1

it lies! py-id3 has not been installed already!

finally, i tried to run `pkgdb -F` but got this output:

  $ pkgdb -F

  /usr/local/sbin/pkgdb:34:in `require': No such file to load
    -- optparse (LoadError)
  from /usr/local/sbin/pkgdb:34

i had a look in /usr/local/sbin/pkgdb and it seems to be a ruby app and
the offending line seems to be trying to import the 'optparse' module.

thankfully my locatedb is out of date, and it seems that something
called optparse used to exist, but doesn't any more:

  $ locate optparse | head -2

  /usr/local/lib/ruby/site_ruby/1.6/optparse
  /usr/local/lib/ruby/site_ruby/1.6/optparse/shellwords.rb

  $ ls -al /usr/local/lib/ruby/site_ruby/1.6/optparse

  ls: /usr/local/lib/ruby/site_ruby/1.6/optparse:
      No such file or directory

and, from what i can gather from locatedb, everything else that was in
/usr/local/lib/ruby/site_ruby/1.6/ is still there, e.g. portsdb.rb

i am not sure how ruby/optparse vanished from my system, but i am hoping
that this is the cause of my problems and i thought i would let the list
know so that perhaps in future, precautions could be taken against vital
dependencies of pkgdb disappearing?

(i am also not sure how ports was affected by it, does ports depend on
pkgdb/optparse?)

anyways, off to grab the optparse files, and hopefully end my woes.

-- 
best regards, tav
tav at espians.com



More information about the freebsd-ports mailing list