puppetlabs/packaging — pull request #228 by MosesMendoza (2013-10-31 00:50:44+00:00)
Title: (RE-534) sudo rm the basedir. Yikes.

We can't actually just rm -r the basedir, because mock owns it and sets perms
as such. I should have known this, because we already encountered it previously
and adjusted for as much in this very file. This commit updates the rm to do a
sudo rm. Added checks to make sure that the basedir exists and is a directory
are added, because I'm paranoid.

Signed-off-by: Moses Mendoza