ports-mgmt/pkg: pkg query -e %#r condition doesn't match properly

From: Tatsuki Makino <tatsuki_makino_at_hotmail.com>
Date: Wed, 03 Aug 2022 08:34:44 UTC

query command in pkg-1.18.3 doesn't seem to properly match evaluations containing %#r.
For example,

pkg query -e "%#r != 1" "%n-%v:%#r" | grep :1\$

At this time, it is likely that flavor is involved in all of the entries that appear even though they should not match.

However, I am going to sleep now, so someone please continue to look into this.