From 6771a2191609324fe94242f0d6803d901e1fc993 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Oct 22 2019 13:32:13 +0000 Subject: pkgset: Only reuse valid old repo Instead of just checking that the repo directory exists, make sure the repodata subdirectory is in there. If it's missing, then createrepo_c has nothing to use anyway, and it may help avoid issues. Signed-off-by: Lubomír Sedlář --- diff --git a/pungi/phases/pkgset/common.py b/pungi/phases/pkgset/common.py index 6e53cfc..135c7f8 100644 --- a/pungi/phases/pkgset/common.py +++ b/pungi/phases/pkgset/common.py @@ -77,7 +77,7 @@ def get_create_global_repo_cmd(compose, path_prefix, repo_dir_global, pkgset): repo_dir, os.path.abspath(compose.topdir).rstrip("/") + "/" ) old_repo_dir = os.path.join(old_compose_path, rel_path) - if os.path.isdir(old_repo_dir): + if os.path.isdir(os.path.join(old_repo_dir, "repodata")): compose.log_info("Using old repodata from: %s", old_repo_dir) update_md_path = old_repo_dir