Option Changed Reinstall
Ever noticed this in the middle of your update?
How to find out what's causing it
Looking at the locally set options is done like this:
Looking at the remote options is done like this:
So, in this case, the option GNUPG2 had been added and set to "off" which was the default there.
This means nothing really changed and that pkg is just not being really careful with the input. At least now it doesn't differentiate different cases of option differences.
Using this local/remote comparism, you can compare if a package difference will break any of your local configuration.
You can manually do it as above, or using the script further down.
please think carefully if you automatically run pkg!
What I can suggest is to first run pkg <action> -n and then screen-scrape the output.
You need not allow removal or reinstall changes from automation.
CFEngine, whenever it will happen, will actually hook into the pkg shell, but I doubt they can *fix* that.
If you work with custom / frozen repositories it's not as bad, but if you're on the smaller side, running just a few servers: please be really careful about this whole thing.
Unfortunately I don't have time to make a good script for you (since I already spent that time finding out that this is in fact no worrysome option change)
What I can offer is working example using diff...
The output looks like this:
Here it indicates i.e. that the php-5.3 port probably now as a broken apache module.
Keyword to look at is "ATTENTION".
(Later ones had mod_php but not php-5.3. So, if i used pkg upgrade here without checking I might end up with a dead server)
if you call it with -a it'll reduce the output and show only ports where an option changed??? to off. Not sure if this is really the perfect solution.
It's past midnight, right now I think -a isn't yet correctly implemented...
You might also wanna add some code to not even have it mention DOCS / EXAMPLES? :)
Script for autodetection, new version
Filters DOCS and no output of package name if -a was given.
We might also want to skip off off (null) or off (null) off deltas, but I don't have enough experience for that.