29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
From 8bbf9ac13e8e54ec6f51828436744448058db2db Mon Sep 17 00:00:00 2001
|
|
From: Lubomír Sedlář <lsedlar@redhat.com>
|
|
Date: Oct 17 2019 07:17:36 +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ář <lsedlar@redhat.com>
|
|
|
|
---
|
|
|
|
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
|
|
|
|
|