pkg list origins?

If I have some origins set for pkg using a command like..

Code:
# pkg set -o lang/php56:lang/php54
... then how do I list and manage those settings? I.e. if I have a machine I am not familiar with, how can I check what options have been changed for pkg using the set command?
 
AFAIK pkg-set(8) uses SQL UPDATEs under the hood, which means there is no way to list those settings as they are just overwritten in the package database.
 
Yeah, any changes you make to the dependencies are not tracked and the original dependencies that were in effect when the package was installed the first time are not backed up anywhere. There might be a history for the SQLITE database but it's not exposed to the user at the moment.
 
This will show the package origin if set (nothing if not):

Code:
# pkg query '%o %v' php5
I still don't know how you would list set origins for all packages.
 
This is hacky, but it works: pkg info -o `pkg info -q`.

Your command works. Just remove the package name to query all packages: pkg query '%o %v'

None of these are really ideal, because they don't show the difference between what would be the default origins and the current ones. As per the example in the OP, I would have to know the default versions for everything in order to spot the changes. What I'd really like to see is a list of only packages for which the origin has been changed from the default. My command,

Code:
# pkg query '%o %v' php5

...shows output on a machine where the origin for lang/php5 has been set using the command in the OP, but shows no output on a machine where the origin has not been changed.
 
Back
Top