From 6771a2191609324fe94242f0d6803d901e1fc993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 17 Oct 2019 09:17:36 +0200 Subject: [PATCH] pkgset: Only reuse valid old repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ář --- pungi/phases/pkgset/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pungi/phases/pkgset/common.py b/pungi/phases/pkgset/common.py index 6e53cfc9..135c7f86 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