For my FreeBSD 9.2 servers I'm using the ports tree and using the current (old?) package manager to create the packages for further distribution. I have been playing with
pkgng but don't feel confident enough yet to do the switch already.
In general I like working with
pkgng; it's relatively easy to get around in if you're used to the current tools. Apart from some minor differences. For example; I had a little trouble finding the equivalent of
pkg_info -W (identify the package which contains the file specified on the commandline) because I kept looking at the
pkg-info(8) manual page. After that I tried
pkg-query(8) while it turned out that I actually needed
pkg-search(8), which I then confused for
pkg-which(8) while originally writing this message
However it does need a little work on the documentation and error messages.
pkg.conf(5) includes an example configuration file which also uses the
repos_dir option. Unfortunately that option isn't explained in the manual page itself yet. And because I only needed / wanted one directory I ended up defining a regular string, not an array. I assumed the array to be an optional setting if you needed to specify multiple entries.
That turned out to be wrong, but unfortunately
pkg doesn't clearly tell you as much:
Code:
root@smtp2:/usr/local/etc # pkg info
pkg: Your pkg.conf file is in deprecated format you should convert it to the following format:
====== BEGIN pkg.conf ======
"pkg_dbdir": "/var/db/pkg"
"pkg_cachedir": "/var/cache/pkg"
"portsdir": "/usr/ports"
"handle_rc_cripts": false
"repos_dir": "/usr/local/etc/pkg/repos"
"syslog": true
"autodeps": true
"developer_mode": false
"pkg_env": {
"http_proxy": "http://myproxy:3128"
}
====== END pkg.conf ======
pkg: Expecting a list for key repos_dir, ignoring...
This suggestion turns out to be incorrect since you don't need to put all options within quotes. It's merely that the
repos_dir option is defined incorrectly. The moment I change this into the right format everything works normally again:
Code:
repos_dir: [ "/usr/local/etc/pkg/repos" ]
Although
pkg does correctly note that it expected a list for this option I was a little confused at first about the comment regarding the use of an deprecated format. It even suggested using the wrong option.
But apart from those small oddities it works pretty smoothly in general. I also like the way the package system now combines external features such as package auditing as well. It really makes sense to have those features rolled into one program.
Edit: Added pkg-which reference to avoid possible confusion.