Subject: Re: Location of packages
To: Daniel R. Killoran,Ph.D. <drk@shore.net>
From: Sean J. Schluntz <schluntz@agames.com>
List: port-mac68k
Date: 08/09/1999 09:12:54
In message <l03130302b3d1e9c4fb10@[207.244.109.227]>, "Daniel R. Killoran,Ph.D.
" writes:
>Ok, I did that (cpin'd addnerd-1.6.tgz onto the disk under /)
>and typed
>pkg_add addnerd-1.6.tgz
>
>and it replied:
>
>pkg_add: Database-dir /var/db/pkg cannot be generated, aborting.
>
>but I checked, and /var/db/pkg is there, but empty. I tried deleting pkg
>and tried again, with the same result.

Ok, I ran in to the same problem, but found a different way to fix it.  I found that if you tried pkg_info -dump it would complain about not being able to find /var/db/pkg/pkgdb.byfile.db and then exit.  I then did a 'touch /var/db/pkg/pkgdb.byfile.db' and everything worked from then on. (pkg_add, pkg_delete). 

I bet that if you touch the pkgdb.byfile.db it would fix your problem also.  It looks to me like the "if dbnot there create" part of pkg_add is broken, but not being bery good at c I don't know if I can look in the code to see if that is the real problem.

-Sean