How to find ports name from package that is a flavor?

cracauer@

Developer
Given (1) a ports tree and (2) the name of a package that is a non-default flavor of a differently named port, how do I find which port it is coming from?

E.g. qemu-guest-agent
 
Maybe make -n of the port that has flavors and grep out the dependency builds that it triggers with this flavor enabled, and hope you recognize the special case port?
 
Maybe make -n of the port that has flavors and grep out the dependency builds that it triggers with this flavor enabled, and hope you recognize the special case port?

But I don't know which directory to start `make -n` in.
 
But I don't know which directory to start `make -n` in.
In the port dir but all dependencies that are already installed will not show up anymore. It's a chain of if conditions that shows what would be done by make in the current situation. Something must differ if you add a FLAVOR= assignment to the make command that's recognized..
 
But there is no way to ask the ports tree for that info?
It might not be exactly what you were hoping for.
Code:
$ /usr/ports/Tools/scripts/portsearch qemu-guest-agent

Port:   qemu-guest-agent-11.1.0
Path:   /usr/ports/emulators/qemu
Info:   QEMU CPU Emulator (guest agent)
Maint:  bofh@FreeBSD.org
Index:  emulators
B-deps: ...
 
If the pkg is already installed:
Code:
% pkg info -o qt6-base_sqldriver-sqlite       
qt6-base_sqldriver-sqlite-6.11.2 databases/qt6-base_sqldriver
 
But there is no way to ask the ports tree for that info?
Try the ports(7) search target (this requires the INDEX file, see index or fetchindex ):
Code:
%  make  -C  /usr/ports  search  name=qemu-guest-agent  display=path
Path:    /usr/ports/emulators/qemu

Port:    emulators/qemu-guest-agent
Moved:    emulators/qemu@guestagent
Date:    2023-01-20
Reason:    Seperate port merged with main port as a flavor

For more details on the search target, see ports(7).

quicksearch:
Code:
%  make  -C  /usr/ports  quicksearch  name=qemu-guest-agent
Port:    qemu-guest-agent-11.1.0
Path:    /usr/ports/emulators/qemu
Info:    QEMU CPU Emulator (guest agent)

Port:    emulators/qemu-guest-agent
Moved:    emulators/qemu@guestagent
Date:    2023-01-20
Reason:    Seperate port merged with main port as a flavor
 
Back
Top