From owner-freebsd-pkg@freebsd.org Sun Sep 17 18:33:27 2017 Return-Path: Delivered-To: freebsd-pkg@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E76FE2398C for ; Sun, 17 Sep 2017 18:33:27 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from echo.brtsvcs.net (echo.brtsvcs.net [IPv6:2607:f740:c::4ae]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D84F68B1F for ; Sun, 17 Sep 2017 18:33:27 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from chombo.houseloki.net (c-73-240-250-185.hsd1.or.comcast.net [73.240.250.185]) by echo.brtsvcs.net (Postfix) with ESMTPS id 3CA8638F7B for ; Sun, 17 Sep 2017 18:33:26 +0000 (UTC) Received: from [IPv6:fe80::7102:4df8:1f13:5c55] (unknown [IPv6:fe80::7102:4df8:1f13:5c55]) by chombo.houseloki.net (Postfix) with ESMTPSA id CCC3546E for ; Sun, 17 Sep 2017 11:33:24 -0700 (PDT) To: freebsd-pkg@freebsd.org From: Mel Pilgrim Subject: Get list of packages installed from a given repo Message-ID: <369a094a-f6c6-9829-0fba-eb34c5ea9579@bluerosetech.com> Date: Sun, 17 Sep 2017 11:33:27 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Sep 2017 18:33:27 -0000 I maintain local repos on top of the public pkg repo, and I want to check which pkgs were installed from which repos. I know pkg knows this information (the %R query keyword), but this doesn't work: # pkg query -e '%R !~ FreeBSD' %o malformed evaluation string # pkg query -e '%R ~ local' %o malformed evaluation string How do I query for a list of installed pkgs based on an evaluation of the repo name?