Delete lookaside cache dir

If --lookaside option passed to repoclosure command, extra cache dir
will be created and it should be deleted too.

JIRA: COMPOSE-2565
Signed-off-by: Haibo Lin <hlin@redhat.com>
This commit is contained in:
Haibo Lin 2019-08-22 14:24:01 +08:00
parent 048698d885
commit 29224b02ff

View File

@ -111,6 +111,11 @@ def _run_repoclosure_cmd(compose, repos, lookaside, arches, logfile):
if os.path.isdir(cache_dir):
shutil.rmtree(cache_dir)
for repo_id in lookaside.keys():
cache_dir = os.path.join(top_cache_dir, repo_id)
if os.path.isdir(cache_dir):
shutil.rmtree(cache_dir)
def check_image_sanity(compose):
"""