puppetlabs/packaging — pull request #227 by MosesMendoza (2013-10-31 00:29:49+00:00)
Title: (RE-534) Always clean up temporary mock roots

This commit updates the mock.rake file to always remove the temporary mock root
on an error, after reading the contents of any logs and printing them to
stdout. The temporary configdir that is created is always removed, since it is
useless regardless of success/failure. This way we help ensure, on many
failures, that our builders don't get full. Since we're printing the logs, the
usefulness of the mockroot is substantially diminished, so we're safe just
blowing it away. We only want to blow these directories away in the case that
we're using random mockroots, otherwise we'll just remove all of /var/lib/mock,
which isn't what we intended. This commit also moves the return of the FileList
of built artifacts into the success case block making it an explicit return.
This is just to enhance code flow/readability.

Signed-off-by: Moses Mendoza