singing needs to go into to correct path

This commit is contained in:
2021-05-30 18:46:14 +02:00
parent 1094efcec5
commit 387260480a

View File

@@ -27,6 +27,7 @@ regex_pkg_repo = re.compile(r"^(.*)-.*-.*-(?:x86_64|any)\.pkg\.tar\.zst(?:\.sig)
fp = None
update_last = time.time()
copy_l = Lock()
repos = []
def build(pkgbuild: str, repo: str) -> None:
@@ -110,7 +111,7 @@ def run_worker() -> None:
def do_repo_work() -> None:
for repo in config["repos"]:
for repo in repos:
args = ["repo-add", "-s", "-v", "-p", "-n",
os.path.join(config["basedir"]["repo"], repo, "os", config["arch"], repo + ".db.tar.xz"), "*.zst"]
r_res = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
@@ -284,12 +285,12 @@ def parse_repo(name, repo) -> LegacyVersion:
def sync_marchs_with_config() -> None:
repos = []
existing_repos = []
with os.scandir(config["basedir"]["repo"]) as it:
entry: os.DirEntry
for entry in it:
if not entry.name.startswith('logs') and entry.is_dir():
repos.append(entry.name)
existing_repos.append(entry.name)
repo_quota = []
@@ -297,8 +298,10 @@ def sync_marchs_with_config() -> None:
repo_quota.append("{}-{}".format(r, a))
logging.info("Repos: %s", repo_quota)
repos_create = list(set(repo_quota) - set(repos))
repos_delete = list(set(repos) - set(repo_quota))
global repos
repos = repo_quota
repos_create = list(set(repo_quota) - set(existing_repos))
repos_delete = list(set(existing_repos) - set(repo_quota))
for repo in repos_create:
logging.debug("Create repo %s: %s", repo, os.path.join(config["basedir"]["repo"], repo, "os/x86_64"))