pkg
pkg copied to clipboard
Can't use %R in pkg-query expressions
In pkg-query, %R is the repository from which the pkg was fetched. It works in a format string:
# pkg query '%R %n-%v' | grep ^local
local dovecot-2.3.19.1_1
local dovecot-pigeonhole-0.5.19
local postfixadmin-php81-3.4.d.20211018
But it doesn't work in an expression:
# pkg query -e '%R = local' '%n-%v'
malformed evaluation string
There's nothing repository-related amongst the variables under https://man.freebsd.org/cgi/man.cgi?query=pkg-query&sektion=8&manpath=freebsd-ports#EVALUATION_FORMAT.
Can %R be added to the evaluation format?
no %R cannot be added to the evaluation format easily, at least not in its current internal form.