Problem with new pkg and pkg2ng

Hi,
This morning, on an 8.3 amd64 server, followed the page: https://wiki.freebsd.org/pkgng

After all is said and done, pkg2ngshows a ton of fstat() failed....

I had to clean all ports with pkg_delete -a (doing first what Using portmaster to do a complete reinstallation of all your ports states.

After pkg_delete -a is finished and there is ONLY local.sqlite left in /var/db/pkg. Subsequently running any make (in ports) for the ports which were previously installed, displays failure as it sees the port as already installed.

In /etc/make.conf I now have it as:
Code:
# WITH_PKGNG=yes
NO_WARNING_PKG_INSTALL_EOL=yes

Right now, just installing samba4 from ports and it seems to be going okay.

So I am kind of at a loss here as to how to get the new pkg working properly.

Thanks for your help!
 
You have to stop mixing the two package databases. Normally, it goes like this:

  • While still using the old package system (pkg_*), install ports-mgmt/pkg.
  • Edit /etc/make.conf, adding
    Code:
    WITH_PKGNG=yes
  • Run pkg2ng to import the old package information into the new database.
  • Stop using the old pkg_* commands forever.

By commenting out WITH_PKGNG=yes, you are using the old package database. However, since you have deleted the old package database with pkg_delete -a, there may not be a way to recover that data even after enabling the new package database.
 
Since everything has already been removed I suggest removing /var/db/pkg/local.sqlite. Then first install ports-mgmt/pkg and run pkg2ng. The only package installed should be pkg. After that re-install everything using pkg(8).
 
Back
Top