#1281 pkgset: Only reuse valid old repo
Merged 4 years ago by lsedlar. Opened 4 years ago by lsedlar.

@@ -77,7 +77,7 @@ 

                  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

  

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.

Looks good to me. :thumbsup:

rebased onto 6771a21

4 years ago

Pull-Request has been merged by lsedlar

4 years ago