Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jan 2013 08:46:44 +0000
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        Yasuhiro KIMURA <yasu@utahime.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Way to know what require update packages with PKGNG
Message-ID:  <50F27474.40405@FreeBSD.org>
In-Reply-To: <20130113.115444.486245100.yasu@utahime.org>
References:  <20130113.115444.486245100.yasu@utahime.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
------enig2AEUKKRAMLUUVERIOAMGQ
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 13/01/2013 02:54, Yasuhiro KIMURA wrote:
> Hello all.
>=20
> 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.
>=20
> % pkg_info -R `find /var/db/pkg -name +DESC -newer /usr/ports/INDEX-9 -=
print | sed 's|/var/db/pkg/\(.*\)/+DESC|\1|'`
>=20
> 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
instead.

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.

	Cheers,

	Matthew

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



------enig2AEUKKRAMLUUVERIOAMGQ
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlDydHoACgkQ8Mjk52CukIyZjgCeO6f1jK8n4qucw44e7vGWsPlv
Z2AAnjovu/pdVZVkJGl+gj4PzJwv7Mok
=hoDY
-----END PGP SIGNATURE-----

------enig2AEUKKRAMLUUVERIOAMGQ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50F27474.40405>