This is a non-trivial amount of work with lots of edge cases, since we can't prevent someone/something else installing a package while puppet is running. I'm going to close this as won't fix, but if you want to contribute/work on it, feel free to submit a pull request.