From owner-freebsd-ports@FreeBSD.ORG Thu Aug 30 21:32:47 2012 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB6C7106564A; Thu, 30 Aug 2012 21:32:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B36168FC14; Thu, 30 Aug 2012 21:32:47 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7ULWltM064961; Thu, 30 Aug 2012 21:32:47 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7ULWlml064960; Thu, 30 Aug 2012 21:32:47 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Thu, 30 Aug 2012 23:32:44 +0200 From: Baptiste Daroussin To: Julien Laffaye Message-ID: <20120830213244.GO64447@ithaqua.etoilebsd.net> References: <503FDB2A.4000609@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Vy1A5eXR7jld12ZH" Content-Disposition: inline In-Reply-To: <503FDB2A.4000609@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "ports@freebsd.org" , John Nielsen , "current@freebsd.org" Subject: Re: Script to set/unset "automatic" status in PKGNG database X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 21:32:48 -0000 --Vy1A5eXR7jld12ZH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 30, 2012 at 11:29:14PM +0200, Julien Laffaye wrote: > On 8/30/2012 11:19 PM, John Nielsen wrote: > > I today noticed the "pkg autoremove" command for the first time, which = does much the same thing as pkg_cutleaves but relies on the "automatic" fla= g in the pkgng database rather than user input to determine which "leaf" po= rts can be removed. Unfortunately, the pkg2ng utility has no way of knowing= which old-style packages it converts were installed automatically as depen= dencies, so they are all marked as non-automatic (i.e. user-requested). In = my case, this was not true for the majority of installed ports. Since I rea= lly like this functionality, I decided to update my local package database = to match my preferences. > > > > Having succeeded, I decided a tool to make doing so easy could well ben= efit others (as well as my future self). (Plus I wanted an excuse to play w= ith dialog(1) and "pkg query" a bit.) So here's the result. I'm not too att= ached to the name. It shouldn't eat your package database or steal your lun= ch money, but I'm not responsible if it does. Other than that, feedback is = welcome. > > > > > > JN > > > You want to use `pkg set -A` :) > We make zero promises concerning the SQL schema in pkgng so it can=20 > change at every time and break your script. > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" Oh right I missed the sql part :D --Vy1A5eXR7jld12ZH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlA/2/wACgkQ8kTtMUmk6ExtVQCgmq6NjM3lkQ/kWhwbPgG0pxNs JUAAn2uvATrkgSuL0S+8nomyslcqozEi =KlUz -----END PGP SIGNATURE----- --Vy1A5eXR7jld12ZH--