I'm looking for a way to automatically install a ports tree that matches the current package repo.
Note for those who are about to say that people should avoid mixing ports and packages:
You can't. There are many ports that cannot be packaged for licensing reasons (audio/lame, sysutils/fusefs-exfat, etc).
So to avoid dependency version mismatches, anyone using binary packages should make sure that their ports tree is the same branch as their pkg repo and update both of them regularly. With quarterly, this will almost guarantee that there are no version mismatches, since versions changes are essentially forbidden. With latest, binary packages may take up to a few days to appear after ports commits, but incompatible versions are extremely unlikely as long as you update both your packages and ports tree regularly.
The problem with what I'm attempting is that the url in pkg.conf simply contains "latest" or "quarterly" rather than the specific quarterly branch such as "2020Q2". In order to check out the proper ports tree, we need to determine exactly which quarterly branch is currently in effect.
I'm wondering if the specific quarterly ports branch from which the package repo is built is even embedded anywhere in local files and easily queried. I'm not seeing anything in the package docs and I've tried poking around /var/db/pkg with sqlite to to avail. I'd rather not try to guess it based on the current date or query the package server to see which branch "quarterly" is linked to.
Thanks,
JB
Note for those who are about to say that people should avoid mixing ports and packages:
You can't. There are many ports that cannot be packaged for licensing reasons (audio/lame, sysutils/fusefs-exfat, etc).
So to avoid dependency version mismatches, anyone using binary packages should make sure that their ports tree is the same branch as their pkg repo and update both of them regularly. With quarterly, this will almost guarantee that there are no version mismatches, since versions changes are essentially forbidden. With latest, binary packages may take up to a few days to appear after ports commits, but incompatible versions are extremely unlikely as long as you update both your packages and ports tree regularly.
The problem with what I'm attempting is that the url in pkg.conf simply contains "latest" or "quarterly" rather than the specific quarterly branch such as "2020Q2". In order to check out the proper ports tree, we need to determine exactly which quarterly branch is currently in effect.
I'm wondering if the specific quarterly ports branch from which the package repo is built is even embedded anywhere in local files and easily queried. I'm not seeing anything in the package docs and I've tried poking around /var/db/pkg with sqlite to to avail. I'd rather not try to guess it based on the current date or query the package server to see which branch "quarterly" is linked to.
Thanks,
JB