From nobody Fri Oct 31 17:18:39 2025 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cynkm0WGNz6G6xw; Fri, 31 Oct 2025 17:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cynkl6cH1z3wcf; Fri, 31 Oct 2025 17:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761931119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rwiaZW312VI4GqHEEvWg2vPlMTpoQGn5dPonILw0JUs=; b=rtXRFKp+kzImMv/c9nLWT8IVQrpkpH9t0IL5O7EMx/p0dlRdutnXLJ8pEpxUfHPZLzkhsQ Zly+Js7HCV8z0EQSsMWNlAuusuLdzuESXuLf3ng54TksOYuHQIeigEcBkNHr29rCW0AAKU O5RJnUGhgIPu6fOsS1Qt8Ihdq3BThaxNe4Ig3/MzpHGd/eYfXkDDA+0HlfCT14G5FbNHGI YNBqkZtoT/RvFRlO2bERLcjYXRVWVMllnGJgrb9jwcj1439C6CkY10RurQNKJLeuLg5vUf zRb1HVfHDPuUU/4K+VspkOtL28nbA0WY7qEVlBjWi3c+7fXPCRpYrLjfm0NmXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761931119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rwiaZW312VI4GqHEEvWg2vPlMTpoQGn5dPonILw0JUs=; b=tn77D+2Qq/cBu+VatUFr5LycdPNnrzMbS0CyhwPiEOFW0NZaOP74krHzv/ASneRPhouWL0 dh1oEY6G4gqcFyVPQ1noe6UQqmTyfJLY/L6zazEzskYST1psjoi4xbUc7E/AAoSwTdkDum YjWGKTRLCw4+RxC1IbN3HaVSAwW31Q/V96RVvqb4yfNTf8URun9afFsG4ygnMtGPWqlQBq mXs2oWf60Q2KUPhrKXSsRCOA61Qe2tfHwxTE9In8hV6v/lgA0fTPChAeieKOQ72eLN2VkV uLXscfib5SgFurZuycgFz+CRue5C0DDPsgK0rwMt+eLwPvsw2MMTLsoL4wy0OQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761931119; a=rsa-sha256; cv=none; b=lslRj942X6laUL8KQivVe7fWf+np0eyNl5CNhcaJyVG+lqk0EAIks73KgX6iCpYGZ+cvwu PBDPbU8HANUQDUw1U/VAOm8qDBpnWjXMRoXXXEWioPmz8avMn5xof20Zi7KFBdmitWx5zd UJI5MgyYj3DknK+a2AZUj7QapM5VVszR5Y5b9hy90xjbDsa/WYIctywka+HTAkiBk+W/IE pH99Gmg8jG/GbxYLw2kNLYFqZHSj6n86vq6SspgnyN+eLa72GFHkzGpSk+h2gT8m4bZQAK g5kuxUUJFUQUOjCgyngl00pmFFEsdi6+bMxFs1omAsip6WcwyinQW3umswvA6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cynkl6CVGz1Gl1; Fri, 31 Oct 2025 17:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59VHIdv8054698; Fri, 31 Oct 2025 17:18:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59VHIdxF054695; Fri, 31 Oct 2025 17:18:39 GMT (envelope-from git) Date: Fri, 31 Oct 2025 17:18:39 GMT Message-Id: <202510311718.59VHIdxF054695@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 9cbf77aba0aa - main - Tools/scripts: add installed-ports-by-origin.sh List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cbf77aba0aa6f3e8f88b21fa04b5fc8fc060810 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=9cbf77aba0aa6f3e8f88b21fa04b5fc8fc060810 commit 9cbf77aba0aa6f3e8f88b21fa04b5fc8fc060810 Author: Ralf van der Enden AuthorDate: 2025-10-28 21:49:34 +0000 Commit: Robert Clausecker CommitDate: 2025-10-31 17:14:47 +0000 Tools/scripts: add installed-ports-by-origin.sh This script generates a list of all installed ports by origin. This is similar pkg info -qoa, but with flavors. This is useful for example to create a list of ports for Poudriere to build. --- Tools/scripts/installed-ports-by-origin.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Tools/scripts/installed-ports-by-origin.sh b/Tools/scripts/installed-ports-by-origin.sh new file mode 100755 index 000000000000..96375ed1fd1a --- /dev/null +++ b/Tools/scripts/installed-ports-by-origin.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +# Constributed by Ralf van der Enden +# Public domain. + +# print a list of all installed ports by origin with flavour. +# this is similar to pkg info -qoa, but prints a flavour if the +# package has one. + +sqlite3 /var/db/pkg/local.sqlite \ + "select origin || coalesce('@' || ( + select t4.annotation as annotation + from packages t1 + inner join pkg_annotation t2 on t1.id = t2.package_id + inner join annotation t3 on t2.tag_id = t3.annotation_id + and t3.annotation = 'flavor' + inner join annotation t4 on t2.value_id = t4.annotation_id + and t2.tag_id = t3.annotation_id + and t3.annotation = 'flavor' + where t1.origin = t0.origin), '') + from packages t0;"