Clean packages after modules.

This commit is contained in:
Ian Gulliver
2016-03-31 18:11:24 -07:00
parent 80ae731279
commit 2a09d69b4c

View File

@@ -184,10 +184,6 @@ class ImageBuilder(object):
'install',
'--assume-yes',
*self._BASE_PACKAGES)
self._ExecChroot(
chroot_path,
'apt-get',
'clean')
def _RunModules(self, chroot_path):
for module in self._modules:
@@ -198,6 +194,12 @@ class ImageBuilder(object):
},
shell=True)
def _CleanPackages(self, chroot_path):
self._ExecChroot(
chroot_path,
'apt-get',
'clean')
def _RemoveDiversions(self, chroot_path):
for source in self._DIVERSIONS:
self._ExecChroot(
@@ -250,6 +252,7 @@ class ImageBuilder(object):
self._AddDiversions(chroot_path)
self._InstallPackages(chroot_path)
self._RunModules(chroot_path)
self._CleanPackages(chroot_path)
self._RemoveDiversions(chroot_path)
if FLAGS.shell:
self._Exec('bash', cwd=root)