puppetlabs/puppetdb — pull request #209 by cprice-puppet (2012-07-10 17:14:01+00:00)
Title: (#15446) Improve handling of user/group removal on rpm removal

Prior to this commit, we had a few bugs in our handling of
user/group removal during rpm removal:

1. We were not conditioning the calls to groupdel / userdel to
avoid running them during an upgrade, which meant that we
were trying to delete them even during upgrades... which would
have been bad.
2. We had an || where we needed an &&, so we weren't actually
calling the groupdel / userdel commands.
3. We were hard-coding the user's home dir to a bad path.
4. We had some '-r' flags that were wrong and/or unnecessary.

This commit fixes those issues.