Way to know what require update packages with PKGNG

Matthew Seaman matthew at FreeBSD.org
Sun Jan 13 08:46:59 UTC 2013

On 13/01/2013 02:54, Yasuhiro KIMURA wrote:
> Hello all.
> Before migrating to PKGNG, I run following one-liner after updating
> pacagkes, see what are depend on updated ones and check if there are
> programs to be restarted.
> % pkg_info -R `find /var/db/pkg -name +DESC -newer /usr/ports/INDEX-9 -print | sed 's|/var/db/pkg/\(.*\)/+DESC|\1|'`
> Are there any way to know what require update packages with PKGNG?

This does the exact equivalent of your one-liner above: find the
packages that were installed or updated more recently than the ports
index was last modified:

pkg query -e "%t > `stat -f %m /usr/ports/INDEX-9`" "%n-%v"

This should do what you want if you're using portsnap and then compiling
pkgs from ports.  If you're pulling packages from a repo,
then try comparing against the timestamp of /var/db/pkg/repo.sqlite

However, if you're using pkg against a repo, when you type 'pkg upgrade'
it does anyhow show you a list of all the packages it is going to
install or upgrade.  There's also the HANDLE_RC_SCRIPTS setting in
pkg.conf that may be of interest to you.



Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 268 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20130113/d3e3b539/attachment.sig>

More information about the freebsd-ports mailing list