Script to set/unset "automatic" status in PKGNG database
bapt at FreeBSD.org
Thu Aug 30 21:32:48 UTC 2012
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" flag in the pkgng database rather than user input to determine which "leaf" ports can be removed. Unfortunately, the pkg2ng utility has no way of knowing which old-style packages it converts were installed automatically as dependencies, 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 really 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 benefit others (as well as my future self). (Plus I wanted an excuse to play with dialog(1) and "pkg query" a bit.) So here's the result. I'm not too attached to the name. It shouldn't eat your package database or steal your lunch 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
> change at every time and break your script.
> freebsd-current at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
Oh right I missed the sql part :D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20120830/b37ac634/attachment.pgp
More information about the freebsd-ports