Added no-cleanup and no-cleanup-after args to Mock builder

The cache would be cleaned each time Mock was used causing long build time.
This allows using the cache, speeding up rebuilds.
This commit is contained in:
Michael Stead 2012-03-13 16:54:15 -03:00
parent 483dbafc6b
commit 306ea4b2d8

View file

@ -844,6 +844,12 @@ class MockBuilder(Builder):
raise TitoException("No such mock config dir: %s" % mock_config_dir)
self.mock_cmd_args = "%s --configdir=%s" % (self.mock_cmd_args, mock_config_dir)
if 'no-clean' in args:
self.mock_cmd_args = "%s --no-clean" % (self.mock_cmd_args)
if 'no-cleanup-after' in args:
self.mock_cmd_args = "%s --no-cleanup-after" % (self.mock_cmd_args)
# TODO: error out if mock package is not installed
# TODO: error out if user does not have mock group