Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2012 06:56:41 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        John Nielsen <lists@jnielsen.net>
Cc:        "ports@freebsd.org" <ports@FreeBSD.org>, "current@freebsd.org" <current@FreeBSD.org>, Julien Laffaye <jlaffaye@FreeBSD.org>
Subject:   Re: Script to set/unset "automatic" status in PKGNG database
Message-ID:  <50405219.8090804@FreeBSD.org>
In-Reply-To: <D1F2FA16-85D7-4365-B4BB-235C1A7D5327@jnielsen.net>
References:  <CFA2273E-4498-4A64-BC9F-CE5AA560409D@jnielsen.net> <503FDB2A.4000609@freebsd.org> <D1F2FA16-85D7-4365-B4BB-235C1A7D5327@jnielsen.net>

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

On 30/08/2012 22:44, John Nielsen wrote:
> After dialog(1) exits the script has a list of packages to mark as
> automatic. Is there a non-SQL way to efficiently get the inverse?
> I.e. the set { all_packages - new_automatic_package_list } ?

Use pkg query - it is really quite powerful.  This shows all
non-autoremove packages as name-version:

pkg query -e '%a =3D=3D 0' '%n-%v'

and this shows the port origin for all autoremove packages:

pkg query -e '%a =3D=3D 1' '%o'

	Cheers,

	Matthew

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



--------------enig88112785C4A1A92E001C5360
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 Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBAUiAACgkQ8Mjk52CukIwptwCaAjv2e/019kElWA371luGgykg
EHoAnjNkATmu883Y1fF6jfwlbgecMbO4
=Pigw
-----END PGP SIGNATURE-----

--------------enig88112785C4A1A92E001C5360--



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