Remove cached debs from the image

debs cached by APT are useless after the chroot has been built,
remove them to make image smaller (=> faster provisioning).

Closes-Bug: #1514389

Change-Id: I5ca34ae3b540b1b63e4b0c1dc92b78da2442c1ee
This commit is contained in:
alexz
2015-11-13 15:21:22 +02:00
parent 9249787ba5
commit 53564d1ed4
2 changed files with 5 additions and 1 deletions

View File

@@ -186,7 +186,9 @@ class BuildUtilsTestCase(unittest2.TestCase):
mock.call('sed', '-i', 's%root:[\*,\!]%root:$6$IInX3Cqo$5xytL1VZb'
'ZTusOewFnG6couuF0Ia61yS3rbC6P5YbZP2TYclwHqMq9e3Tg8rvQx'
'hxSlBXP1DZhdUamxdOBXK0.%', 'fake_path'),
mock.call('chroot', 'chroot', 'update-rc.d', 'puppet', 'disable')]
mock.call('chroot', 'chroot', 'update-rc.d', 'puppet', 'disable'),
mock.call('chroot', 'chroot', 'apt-get', 'clean')]
self.assertEqual(mock_exec_expected_calls, mock_exec.call_args_list)
mock_files.assert_called_once_with('chroot', ['usr/sbin/policy-rc.d'])
mock_clean.assert_called_once_with('chroot',