Re: Script to set/unset "automatic" status in PKGNG database

看板FB_current作者時間13年前 (2012/09/08 14:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串10/10 (看更多)
On Aug 30, 2012, at 11:56 PM, Matthew Seaman <matthew@freebsd.org> = wrote: > 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 } ? >=20 > Use pkg query - it is really quite powerful. This shows all > non-autoremove packages as name-version: >=20 > pkg query -e '%a =3D=3D 0' '%n-%v' >=20 > and this shows the port origin for all autoremove packages: >=20 > pkg query -e '%a =3D=3D 1' '%o' Thanks. I know about pkg query (and in fact my script uses something = very much like that to get the initial list of automatic packages). What = I was trying to do was get a list of packages installed but not in = another list. The other list represents _future_ automatic packages but = not necessarily what is in the database now. In any case, I worked around it but first unsetting all packages and = then setting the user-selected list back to automatic. JN _______________________________________________ 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"
文章代碼(AID): #1GIjyiq5 (FB_current)
討論串 (同標題文章)
完整討論串 (本文為第 10 之 10 篇):
文章代碼(AID): #1GIjyiq5 (FB_current)