mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 15:11:19 +02:00
Clean up any previous kvm state.
Change-Id: I01fecde5e687992ccf36889803a4cb84b71a38b2 BUG=7818 TEST=Ran with/without previous kvm instance Review URL: http://codereview.chromium.org/3760012
This commit is contained in:
parent
17414a6b24
commit
5911f2003b
@ -233,10 +233,15 @@ def _FullCheckout(buildroot, rw_checkout=True, retries=_DEFAULT_RETRIES):
|
||||
RepoSync(buildroot, rw_checkout, retries)
|
||||
|
||||
|
||||
def _PreFlightRinse(buildroot):
|
||||
"""Cleans up any leftover state from previous runs."""
|
||||
RunCommand(['sudo', 'killall', 'kvm'], error_ok=True)
|
||||
_UprevCleanup(buildroot, error_ok=True)
|
||||
|
||||
|
||||
def _IncrementalCheckout(buildroot, rw_checkout=True,
|
||||
retries=_DEFAULT_RETRIES):
|
||||
"""Performs a checkout without clobbering previous checkout."""
|
||||
_UprevCleanup(buildroot, error_ok=True)
|
||||
RepoSync(buildroot, rw_checkout, retries)
|
||||
|
||||
|
||||
@ -410,6 +415,7 @@ def main():
|
||||
if not os.path.isdir(buildroot):
|
||||
_FullCheckout(buildroot)
|
||||
else:
|
||||
_PreFlightRinse(buildroot)
|
||||
_IncrementalCheckout(buildroot)
|
||||
|
||||
chroot_path = os.path.join(buildroot, 'chroot')
|
||||
|
Loading…
x
Reference in New Issue
Block a user