Path: blob/main/Tools/scripts/installed-ports-by-origin.sh
20836 views
#!/bin/sh12# Contributed by Ralf van der Enden <[email protected]>3# Public domain.45# Print a list of all installed ports by origin with flavour.6# This is similar to pkg info -qoa, but prints a flavour if the7# package has one.89sqlite3 /var/db/pkg/local.sqlite \10"select origin || coalesce('@' || (11select t4.annotation as annotation12from packages t113inner join pkg_annotation t2 on t1.id = t2.package_id14inner join annotation t3 on t2.tag_id = t3.annotation_id15and t3.annotation = 'flavor'16inner join annotation t4 on t2.value_id = t4.annotation_id17and t2.tag_id = t3.annotation_id18and t3.annotation = 'flavor'19where t1.origin = t0.origin), '')20from packages t0;"212223