From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 05:56:56 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 406EC106566B; Fri, 31 Aug 2012 05:56:56 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 98C7F8FC08; Fri, 31 Aug 2012 05:56:55 +0000 (UTC) Received: from seedling.local (host86-182-42-128.range86-182.btcentralplus.com [86.182.42.128]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q7V5unMG076634 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 31 Aug 2012 06:56:51 +0100 (BST) (envelope-from matthew@FreeBSD.org) X-DKIM: OpenDKIM Filter v2.5.2 smtp.infracaninophile.co.uk q7V5unMG076634 Authentication-Results: smtp.infracaninophile.co.uk/q7V5unMG076634; dkim=none (no signature); dkim-adsp=none X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host host86-182-42-128.range86-182.btcentralplus.com [86.182.42.128] claimed to be seedling.local Message-ID: <50405219.8090804@FreeBSD.org> Date: Fri, 31 Aug 2012 06:56:41 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: John Nielsen References: <503FDB2A.4000609@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.4.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig88112785C4A1A92E001C5360" X-Virus-Scanned: clamav-milter 0.97.5 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RCVD_IN_RP_RNBL, RCVD_IN_SORBS_DUL, RDNS_DYNAMIC, SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: "ports@freebsd.org" , "current@freebsd.org" , Julien Laffaye Subject: Re: Script to set/unset "automatic" status in PKGNG database X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 05:56:56 -0000 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--