Re: ports-mgmt/pkg: pkg query -e %#r condition doesn't match properly <PSAPR03MB5639FB7587281A570DE507F9FA9C9@PSAPR03MB5639.apcprd03

From: Tatsuki Makino <>
Date: Wed, 03 Aug 2022 23:11:49 UTC
Helge Oldach wrote on 2022/08/03 23:20:
> Maybe a port with multiple flavors just counts as a single dependency
> %#r? Just a wild guess though.

This is probably because they only check origin matches.
I see such SQL when I run it with pkg -dddddddddddddddddddddddd query.

DBG(4)[70361]> Pkgdb: running 'WITH flavors AS   (SELECT package_id, value.annotation ... WHERE ((SELECT COUNT(*) FROM deps AS d WHERE d.origin=p.origin)!=1) ORDER BY ...

For example, in my environment, I get the following results.

> pkg query -e "%#r > 7" "%n:%#r" | grep xephyr\\\|xorg-

The following changes will prevent matching all at the same time.

> pkg query -e "%#r > 8" "%n:%#r" | grep xephyr\\\|xorg-