Posts: 1

Topic: Howto: migrate from pkg_ tools to pkg

As you can read on FreeBSD Wiki:

Pkg is the Next Generation package management tool for FreeBSD. It is the replacement for the current pkg_info/pkg_create/pkg_add tools that ports use to register local packages and which provide remote packages. Its main goals are to faciliate remote binary package upgrades. It also works with ports without remote binary packages.

Today I started migration to pkg on my FreeBSD 8.4 and 9.3 servers. First of all you should add to file /etc/make.conf this line:

WITH_PKGNG=yes

Then I ran pkg:

# pkg
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg please wait
_http._tcp.pkg.FreeBSD.org
Installing pkg-1.3.7: 100%
Message for pkg-1.3.7:
If you are upgrading from the old package format, first run:
# pkg2ng

If you haven't pkg installed, do it:

make -C /usr/ports/ports-mgmt/pkg install clean

Now you should run pkg2ng to convert old package database, but I've got error:

# pkg2ng
pkg: PACKAGESITE in pkg.conf is no longer supported. Convert to the new repository style. See pkg.conf(5)
pkg: Cannot parse configuration file!
Analysing shared libraries, this will take a while... pkg: PACKAGESITE in pkg.conf is no longer supported. Convert to the new repository style. See pkg.conf(5)
pkg: Cannot parse configuration file!
done