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 22070dcf42
commit 23f4b2a3ec
1 changed files with 5 additions and 2 deletions

View File

@ -75,8 +75,11 @@ def make_dnf_dirs(conf):
:returns: None
"""
for p in ["dnf_conf", "repo_dir", "cache_dir", "dnf_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 == "dnf_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):