Clean packages after modules.
This commit is contained in:
@@ -184,10 +184,6 @@ class ImageBuilder(object):
|
|||||||
'install',
|
'install',
|
||||||
'--assume-yes',
|
'--assume-yes',
|
||||||
*self._BASE_PACKAGES)
|
*self._BASE_PACKAGES)
|
||||||
self._ExecChroot(
|
|
||||||
chroot_path,
|
|
||||||
'apt-get',
|
|
||||||
'clean')
|
|
||||||
|
|
||||||
def _RunModules(self, chroot_path):
|
def _RunModules(self, chroot_path):
|
||||||
for module in self._modules:
|
for module in self._modules:
|
||||||
@@ -198,6 +194,12 @@ class ImageBuilder(object):
|
|||||||
},
|
},
|
||||||
shell=True)
|
shell=True)
|
||||||
|
|
||||||
|
def _CleanPackages(self, chroot_path):
|
||||||
|
self._ExecChroot(
|
||||||
|
chroot_path,
|
||||||
|
'apt-get',
|
||||||
|
'clean')
|
||||||
|
|
||||||
def _RemoveDiversions(self, chroot_path):
|
def _RemoveDiversions(self, chroot_path):
|
||||||
for source in self._DIVERSIONS:
|
for source in self._DIVERSIONS:
|
||||||
self._ExecChroot(
|
self._ExecChroot(
|
||||||
@@ -250,6 +252,7 @@ class ImageBuilder(object):
|
|||||||
self._AddDiversions(chroot_path)
|
self._AddDiversions(chroot_path)
|
||||||
self._InstallPackages(chroot_path)
|
self._InstallPackages(chroot_path)
|
||||||
self._RunModules(chroot_path)
|
self._RunModules(chroot_path)
|
||||||
|
self._CleanPackages(chroot_path)
|
||||||
self._RemoveDiversions(chroot_path)
|
self._RemoveDiversions(chroot_path)
|
||||||
if FLAGS.shell:
|
if FLAGS.shell:
|
||||||
self._Exec('bash', cwd=root)
|
self._Exec('bash', cwd=root)
|
||||||
|
|||||||
Reference in New Issue
Block a user