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

[-- Attachment #1 --]
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 == 0' '%n-%v'

and this shows the port origin for all autoremove packages:

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

	Cheers,

	Matthew

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



[-- Attachment #2 --]
-----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-----

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