pkgng/pkgng — pull request #247 by rg1 (2012-05-30 15:07:39+00:00)
Title: Change pkg check -r to also update file checksums.

This is an attempt to allow fixing of checksums with pkgng.

Since I couldn't find any example of altering an installed package, I wrote a specialized function that simply updates the sha256 for a file. I'm wondering if a more general approach to altering a package might be appropriate, but I got the impression this is not desired anyway.

I also think that having pkg check actually alter data is a bit counter-intuitive. But since it was already altering the size and it was suggested on irc, I've just extended it (and moved some stuff around to fit). After all, why would the size change but not the checksums?

Please let me know what you think and if you'd like me to change anything.