pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Can't use %R in pkg-query expressions

Open heliosyne opened this issue 2 years ago • 2 comments

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

heliosyne avatar Dec 14 '22 13:12 heliosyne

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.

grahamperrin avatar Feb 19 '23 13:02 grahamperrin

Can %R be added to the evaluation format?

heliosyne avatar Feb 19 '23 15:02 heliosyne

no %R cannot be added to the evaluation format easily, at least not in its current internal form.

bapt avatar Jul 01 '24 13:07 bapt