livemedia-creator: Cleanup temp yum files (#1073502)
When running lmc with --no-virt yum will use /tmp/ to cache some things. If the kickstart or repos change between runs this cache can become stale so remove it when lmc is finished. Resolves: 1073502
This commit is contained in:
parent
cd8e565f78
commit
55cd4d207f
@ -559,6 +559,11 @@ def novirt_install(opts, disk_img, disk_size, repo_url):
|
|||||||
selinux_enforcing = True
|
selinux_enforcing = True
|
||||||
selinux.security_setenforce(0)
|
selinux.security_setenforce(0)
|
||||||
|
|
||||||
|
# Clean up /tmp/ from previous runs to prevent stale info from being used
|
||||||
|
for path in ["/tmp/yum.repos.d/", "/tmp/yum.cache/"]:
|
||||||
|
if os.path.isdir(path):
|
||||||
|
shutil.rmtree(path)
|
||||||
|
|
||||||
args = ["--kickstart", opts.ks[0], "--cmdline", "--repo", repo_url]
|
args = ["--kickstart", opts.ks[0], "--cmdline", "--repo", repo_url]
|
||||||
if opts.anaconda_args:
|
if opts.anaconda_args:
|
||||||
for arg in opts.anaconda_args:
|
for arg in opts.anaconda_args:
|
||||||
|
Loading…
Reference in New Issue
Block a user