Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/Tools/scripts/installed-ports-by-origin.sh
19260 views
1
#!/bin/sh
2
3
# Contributed by Ralf van der Enden <[email protected]>
4
# Public domain.
5
6
# Print a list of all installed ports by origin with flavour.
7
# This is similar to pkg info -qoa, but prints a flavour if the
8
# package has one.
9
10
sqlite3 /var/db/pkg/local.sqlite \
11
"select origin || coalesce('@' || (
12
select t4.annotation as annotation
13
from packages t1
14
inner join pkg_annotation t2 on t1.id = t2.package_id
15
inner join annotation t3 on t2.tag_id = t3.annotation_id
16
and t3.annotation = 'flavor'
17
inner join annotation t4 on t2.value_id = t4.annotation_id
18
and t2.tag_id = t3.annotation_id
19
and t3.annotation = 'flavor'
20
where t1.origin = t0.origin), '')
21
from packages t0;"
22
23