Fix make_dnf_dirs

It was chopping off an extra directory level due to realpath removing
the trailing / from the paths when they are setup.
This commit is contained in:
Brian C. Lane 2018-05-29 16:41:43 -07:00
parent 33c84331fe
commit 25bae61520
1 changed files with 5 additions and 2 deletions

View File

@ -75,8 +75,11 @@ def make_yum_dirs(conf):
:returns: None
"""
for p in ["yum_conf", "repo_dir", "cache_dir", "yum_root"]:
p_dir = os.path.dirname(conf.get("composer", p))
if not os.path.exists(p_dir):
p_dir = os.path.abspath(conf.get("composer", p))
if p == "yum_conf":
p_dir = os.path.dirname(p_dir)
if not os.path.isdir(p_dir):
os.makedirs(p_dir)
def make_queue_dirs(conf, gid):